Current location: Hot Scripts Forums » Programming Languages » PHP » Missing MySQL


Missing MySQL

Reply
  #1 (permalink)  
Old 08-17-04, 03:08 AM
StevieB StevieB is offline
Newbie Coder
 
Join Date: Jun 2003
Location: Scotland
Posts: 88
Thanks: 0
Thanked 0 Times in 0 Posts
Missing MySQL

Hi Guys, I'm probably being really dumb but I have a small problem.

Got MySQL installed and had a database for my forum called "myforumdb"

MySQLShow came up with
+---------------+
+ Databases +
+---------------+
+ myforumdb +
+ mysql +
+ test +
+---------------+

I'd wanted to install a blogger/chat script sorta thing n the php install file wasn't working kept saying couldn't create database or something
Me being stupid decided to create the database for it instead

Typed in
H:\mysql\bin\> mysql -u root -ppassword create test_db

It worked fine cos it came back to the dos prompt but now when I run mysqlshow I get

+---------------+
+ Databases +
+---------------+
+ test_db +
+---------------+

And now I can't get my forum all I get is cannot access database

In mysql if I do SHOW DATABASES it shows the 3 databases as it did before with mysqlshow

I've now managed to get it to show which I'll just say is progress )
+---------------+
+ Databases +
+---------------+
+---------------+

Any Ideas?
__________________
Steve Bremner
Reply With Quote
  #2 (permalink)  
Old 08-17-04, 04:07 AM
mikaelf mikaelf is offline
Wannabe Coder
 
Join Date: Jun 2004
Location: php[dot]net
Posts: 198
Thanks: 0
Thanked 0 Times in 0 Posts
for security reason, mysql password passed on command prompt would be neglected by mysql daemon. thus when you supply command prompt:
H:\mysql\bin\> mysql -u root -p password create test_db

you will be logged in as @localhost (read: nobody@localhost) and MySQL will output error: access denied for user @localhost or access denied for user root@localhost.

to create database using command prompt you are supposed to type using this syntax:
H:\mysql\bin\> mysql -u root -p create test_db
Enter password: your_mysql_root_password

And then:
H:\mysql\bin\> mysqlshow -u root -p
Enter password: your_mysql_root_password

As a test case, try to supply the command prompt with:
H:\mysql\bin\> mysqlshow
__________________
Useful PHP links:
bugs.php.net - for reporting PHP bugs
pear.php.net - PHP extension and application repository
pecl.php.net - get non standard PHP modules, submit yours
www.phpclasses.org - PHP classes repository
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP and MySQL ? rob2132 Hot Scripts Forum Questions, Suggestions and Feedback 4 08-29-08 02:22 AM
MySQL 4.1 Subquery Performance SLOW TokenSDragon PHP 2 06-15-07 12:46 PM
Where are MySQL cache files? darkfreak PHP 4 06-21-04 12:30 AM
mysql crash IMPORTANT comby PHP 0 03-02-04 10:27 AM
great product for dumping/recovering MySQL databases Dave Brown General Advertisements 1 10-03-03 07:40 AM


All times are GMT -5. The time now is 04:20 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.