how to connect mysql database through cmd prompt in linux

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
manohar
Forum Newbie
Posts: 10
Joined: Thu Jun 26, 2008 10:49 am

how to connect mysql database through cmd prompt in linux

Post by manohar »

I want to connect mysql database through cmd prompt in linux
any one can u pls give me reply
Rovas
Forum Contributor
Posts: 272
Joined: Mon Aug 21, 2006 7:09 am
Location: Romania

Re: how to connect mysql database through cmd prompt in linux

Post by Rovas »

You shouldn' t have posted this here there is another section for this
Use

Code: Select all

 
service mysqld start then type mysql 
# if it' s working to this
find / -name mysq
#it will show the path directory of MySQL
cd path
cd share/mysql
./mysql.server start
cd ../..
cd bin
mysql 
 
After this you use the sql command USE to access the database.
Post Reply