|
Title: mysql error Post by: Johnny26652 on October 24, 2006, 08:11:06 PM could not connect to specified instance
mysqlerror number 0 please help.. i was able to test the apache and php as suggested in the article but mysql is not working for me... thanks Johnny Title: Re: mysql error Post by: VGR on October 25, 2006, 12:44:19 PM yo
it seems you use the "instance manager" ? the "error 0" nor the "connect to the specified instance" aren't standard MySqld error codes & messages. I suggest you launch the Mysqld server (on windaube, it's a service, usually, so start the service "mysqld" in service manager ; on a *nix it's mysqld of course) then try to connect using your "root" Mysql user & the password you supplied during installation, using the "mysql" console client : mysql --user=root --password=trucmuche give feedback if need be regards Title: Re: mysql error Post by: Johnny26652 on October 25, 2006, 06:45:46 PM Thanks VGR.
i am still getting the same error when i start mysql administrator. i am using serverhost : localhost username: root password : the one i choose but when i login through command prompt i get the mysql prompt which i think is a good sign. any help with sql administrator. yes i did start mysql service. appreciate your help..when i start my apache and load the php page i don;t see mysql in it.. Title: Re: mysql error Post by: VGR on October 26, 2006, 12:55:04 PM ok... possible causes :
- you use a PHP enabled to use the standard MySql encryption scheme, so called OLD_PASSWORD() while your server is configured (use_old_passwords directive, I think) to use the old ones, or the reverse of course. - firewall blocking access from Apache to MySqld (while it lets pass through the console mysql program... unprobable) - for an unknown reason, "localhost" does not resolve to 127.0.0.1 - try with '127.0.0.1' as a host when connecting from PHP the mysql module should appear in php_info() results, I think it's what you mention wehen writing "mysql is not there" so have a second look at it. If you get into mysql in the console, try SHOW DATABASES (you shoudl see test and mysql), the USE mysql; and then : select Host, User,Password,Drop_priv from user; check that you've something like : +-----------+------+------------------+-----------+ | Host | User | Password | Drop_priv | +-----------+------+------------------+-----------+ | localhost | root | 2283433c6591585d | Y | +-----------+------+------------------+-----------+ the length of the Password data will "tell" you the password scheme used. check mysql.com/manual/en for details about OLD_PASSWORD() you can try to reset the root password both on the console and in your scripts (to see if you can mysql_connect(), mysql_query() and such) : do a update user set Password=OLD_PASSWORD('yourpwd') where User='root' and Host="localhost'; flush privileges; exit; Title: Re: mysql error Post by: Johnny26652 on October 29, 2006, 05:01:00 PM finally i am able to start my sql administrator. i uninstalled and reinstalled i don't know how it fixed but its working now. ok mentors one last question when i load my php.info page i don't see anything relate to mysql as explained in the article.. any help.
now i am ready to learn some fun stuff any starting tutorials for beginners ? thanks a lot. Johnny Title: Re: mysql error Post by: VGR on October 30, 2006, 06:52:04 AM I don't understand why you wouldn't see Mysql in the php_info() results ...
if it's not a standalone machine or behind a closed router/firewall, I could have a look if you provide me the URL ( http://num.eric.ip.addr/yourpage.php ) to vgr@europeanexperts.org Title: Re: mysql error Post by: VGR on October 31, 2006, 04:26:39 PM w3schools : not bad, but truly good tutorials for PHP are (in order of decreasing interest) the www.php.net/manual/en pages, the EEE.org site, and this site ;-)
If you can't get me an online access (even with a dynamic IP address, it's feasible if connected), then save the phpinfo() page and upload it anywhere (yahoo, multimania, free...) or even send it by email. I will have a look. Title: Re: mysql error Post by: VGR on November 10, 2006, 07:43:24 AM ok, so now after having read your phpinfo() results, your php.ini file and such... Some remarks
0) you indeed remarked that PHP5 does no longer come with built-in MySql support, and enabled the extension in php.ini. Good point. 1) check first that you don't have multiple php.ini files and that you edit the good one. 2) don't forget to restart the webserver after changing php.ini (in unix, you could reload config without restarting - that's apache -k I think) 3) you may try first to "fix" an incorrect extension_dir : add a trailing slash, as in extension_dir = "C:/PHP5/ext/" (forward or backslashes notwithstanding) 4) you probably need to copy the libmysql.dll to your %WINDIR% directory (in your case C:\WINDOWS as per phpinfo). Beware, some say "to %windir%\System32" maybe re-read the ***current*** install doc. 97) you may return to the good ol' PHP 4, as a lot of people did after hitting the "PHP5 won't install properly" wall , including me ;-) 98) you're not the only one to have this kind of problems. You may read - the same problem, but with IIS (sigh) : http://forums.devnetwork.net/viewtopic.php?t=22732 - the very same problem http://www.trap17.com/index.php/no-mysql-running-phpinfo-php_t4827.html - I'm against doing this, but you may look at the last comment on http://forums.apress.com/showflat.php?Cat=&Number=1874&page=2&view=collapsed&sb=5&o=&fpart=1 - check absolutely the alternative described in the last post in http://gallery.menalto.com/node/40627 99) good luck :D
Powered by SMF 1.1 RC2 |
SMF © 2001-2005, Lewis Media
Joomla Bridge by JoomlaHacks.com |