If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > I cant connect to my db at my homemade server...

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-05-03, 05:49
gushh gushh is offline
Registered User
 
Join Date: Sep 2003
Posts: 5
Thumbs down 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!
Reply With Quote
  #2 (permalink)  
Old 09-07-03, 15:05
then then is offline
Registered User
 
Join Date: Aug 2003
Location: FDR India
Posts: 24
Scripting language, relevant code and errors??

regards
theN
Reply With Quote
  #3 (permalink)  
Old 09-07-03, 23:39
bdl bdl is offline
Registered User
 
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.
Reply With Quote
  #4 (permalink)  
Old 09-08-03, 01:22
gushh gushh is offline
Registered User
 
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!!
Reply With Quote
  #5 (permalink)  
Old 09-09-03, 01:58
bdl bdl is offline
Registered User
 
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 02:01.
Reply With Quote
  #6 (permalink)  
Old 09-09-03, 20:00
gushh gushh is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On