Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2003
    Posts
    5

    Thumbs down Unanswered: I cant connect to my db at my homemade server...

    So.. I can´t connect to MySQL dbs...
    I have installed MySQL on my winxp pro.

    I putted the user name and password.
    But when i try to use a script that uses mysql, just for test mysql... doesn´t work..

    I dont know what to do.. this is the first time i run MySQL and the documentation is so extense. So i would like some few comments about how to start and use mysql in 10 minutes for example.. (dunno... im just wondering.. i think is possible).

    Cya!

  2. #2
    Join Date
    Aug 2003
    Location
    FDR India
    Posts
    24
    Scripting language, relevant code and errors??

    regards
    theN

  3. #3
    Join Date
    Sep 2003
    Location
    ventura,ca,us
    Posts
    8
    Run the mysql monitor (command line) in a cmd window under win xp. The command c:\mysql\bin\mysql -u yourusername -p should do fine, as long as you actually set a username and password to use. Once in, you'll see a prompt like mysql> where you can type commands.

    Try the command 'show databases;' (always follow a command with a semicolon.

    Try choosing a database with the command 'use databasename;' (in this case, the test database is the default one to try).

    Try listing the tables with the command 'show tables;'.

    You can exit the mysql monitor with CTRL-D or just use the command 'quit'.

    If you can get in with the mysql monitor, you can connect with PHP or whatever other method you use to connect.

  4. #4
    Join Date
    Sep 2003
    Posts
    5

    Unhappy aha..

    Yeah! but now i have another prob!... im using the TEST db cause when i make a new one.. and when i try to connect via php to the db... it says can´t connect..

    im using like 2 guis i downloaded from mysql website..
    i cant use phpmyadmin (i have this one: phpMyAdmin-2.5.3-rc3-php.tar.gz) cause i cant set it up...

    Well.. wich GUI do you recomend me?
    Or how can i install a new db with a user name and pass with the mysql monitor?...

    Thanks!!

  5. #5
    Join Date
    Sep 2003
    Location
    ventura,ca,us
    Posts
    8
    Ok, so you can login to the MySQL monitor, successfully root around, view databases, etc, but you can't access via PHP? My guess is you have either a problem with your PHP config or with your script.

    Example script that will work:
    PHP Code:
    <?
    if (!$link mysql_connect("localhost""username""password"))
        die(
    "Can't connect to database:<br>" mysql_error());
    ?>
    Try that script, it will show you an error if it fails so have a tool to troubleshoot. Replace 'username' and 'password' with the appropriate entries, of course.

    Oh, and by the way, setting up phpmysqladmin is no more difficult than placing the contents of the zip file in your webserver's document root, then editing the config.inc.php to add the absolute URL of the phpmysqladmin directory, your username and password. That's it.
    Last edited by bdl; 09-09-03 at 03:01.

  6. #6
    Join Date
    Sep 2003
    Posts
    5

    ahhhh thanks but..

    Thanks but now i have 0 probs with MySQL

    (dunno why but now works all.. i think it was a bad file of the gui)

    Thankssss!!!!!!!

    PS: now i have to learn how to print a column of an mysql db to an php file.. :s

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •