+ Reply to Thread
Results 1 to 7 of 7

Thread: Using SQL Maestro

  1. #1
    tonymcv1 is offline x10Hosting Member tonymcv1 is an unknown quantity at this point
    Join Date
    Apr 2009
    Posts
    7

    Question Using SQL Maestro

    I want to use SQL Maestro to work on my MySQL databases but I need the connection settings required to access X10hosting.
    I found a thread that told me to use these settings:
    • Host = 'localhost'
    • Port = '3306'
    • User = [Your cPanel username followed by an underscore and the MySQL username you configured in cPanel]
    • Pass = [The password that you used when creating the MySQL user]
    • Database = [ Your cPanel username followed by an underscore and the name of the database that you created in cPanel]

    However, when I try to connect, I get the message -
    Can't connect to MySQL on localhost (10061)

    Has anyone successfully connected using SQL Maestro? I'd appreciate some help.

    Thanks.

  2. #2
    prox12 is offline x10Hosting Member prox12 is an unknown quantity at this point
    Join Date
    Mar 2009
    Posts
    45

    Re: Using SQL Maestro

    PHP Code:
    <html>
         <head></head>
    <body>
    .................

    <?php
    function write_in_db() {
    $servername 'localhost';
    $username 'cpanel_username';
    $password 'password';
    $database "your_db_name";

    $db_connection mysql_connect($servername$username$password)
    or die (
    "Unable to connect to the DB Server!");

    mysql_select_db($database) or die ("Can't select database!");

     
    $query 'INSERT INTO `contacts` '
    '(
    `firstname`,
    `lastname`
    ) VALUES (
    \'' 
    $_POST['firstname'] . '\', 
    \'' 
    $_POST['lastname'] . '\'

    );'
    ;

    // execute query
    $result mysql_query($query) or die ("Error in query: $query. <br>".mysql_error());
    return 
    "inserted ".$_POST['firstname']." and his info into 'contacts'";
    }
    ?>

    ...............

    <?php if(isset($_POST['s_save'])) { echo write_in_db(); } ?>

    <form ........ method="post"
    some form fields

    <input type="submit" name="s_save" value="save">

    </form>

    ...........................

    </body>
    </html>

    To Earn Money, || You Also Need: PayPal/AlertPay.

  3. #3
    tonymcv1 is offline x10Hosting Member tonymcv1 is an unknown quantity at this point
    Join Date
    Apr 2009
    Posts
    7

    Re: Using SQL Maestro

    Thanks for that reply but it doesn't help. You cant write an SQL routine at all until you are connected to a database in SQL Maestro. What I need is the settings to enable me to connect to the server.

  4. #4
    garrettroyce's Avatar
    garrettroyce is offline Generally Helpful Member garrettroyce is a glorious beacon of lightgarrettroyce is a glorious beacon of light
    Join Date
    Apr 2008
    Location
    IL, USA
    Posts
    3,746

    Re: Using SQL Maestro

    'localhost' means that the software is on the same computer as the mysql database. I believe you will be using yoursite.x10hosting.com:3306 or maybe yourserver.x10hosting.com (server being stoli, cossacks, etc)
    gjr.gr - coming soon: secrets of OCD coding from a self taught tinkerer

  5. #5
    tonymcv1 is offline x10Hosting Member tonymcv1 is an unknown quantity at this point
    Join Date
    Apr 2009
    Posts
    7

    Unhappy Re: Using SQL Maestro

    Again, thanks for the reply.
    I've tried what you suggested; no joy I'm afraid....

  6. #6
    garrettroyce's Avatar
    garrettroyce is offline Generally Helpful Member garrettroyce is a glorious beacon of lightgarrettroyce is a glorious beacon of light
    Join Date
    Apr 2008
    Location
    IL, USA
    Posts
    3,746

    Re: Using SQL Maestro

    Ah, read this:
    http://forums.x10hosting.com/program...bc-access.html

    What I would do is create a local install of mysql on your own computer. Then, export the database from your x10 mysql. Then, you can use Maestro to do whatever and import it back in. Not an ideal situation, but I think what you're doing is initial setup and not everyday stuff, right?
    gjr.gr - coming soon: secrets of OCD coding from a self taught tinkerer

  7. #7
    ramredx is offline x10Hosting Member ramredx is an unknown quantity at this point
    Join Date
    Apr 2009
    Posts
    2

    Re: Using SQL Maestro

    thanks! such a great help!

+ Reply to Thread

Similar Threads

  1. SQL ERROR [ mysql4 ] - Too many connections [1040]
    By Toffmonster in forum Free Hosting
    Replies: 1
    Last Post: 06-28-2008, 09:15 PM
  2. sql database does not restore
    By softwork in forum Free Hosting
    Replies: 3
    Last Post: 05-20-2008, 06:47 AM
  3. Cannot upload SQL Data
    By pasacom in forum Free Hosting
    Replies: 5
    Last Post: 02-25-2008, 11:24 PM
  4. Sql?
    By SLIForum in forum Scripts & 3rd Party Apps
    Replies: 4
    Last Post: 12-03-2007, 01:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers