LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-07-2011, 03:59 AM   #1
elainelaw
Member
 
Registered: Jan 2008
Posts: 258

Rep: Reputation: 30
mysql version


I would like to know the version mysql in my server , I use phpinfo.php to check the version .

the following is the result
mysql
=====
MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version 3.23.49
MYSQL_MODULE_TYPE builtin
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_INCLUDE no value
MYSQL_LIBS no value

does it mean the mysql server version is 3.23.49 ? or it only a client version ?

Thanks.
 
Old 01-07-2011, 04:03 AM   #2
novice06
Member
 
Registered: Mar 2006
Location: Singapore
Distribution: RHEL, CentOS
Posts: 132

Rep: Reputation: 23
If you use rpm based linux
rpm -qi mysql
You can find
Version : 5.0.77

Last edited by novice06; 01-07-2011 at 04:04 AM.
 
Old 01-07-2011, 04:04 AM   #3
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
My MySQL version and the client api version are same on phpinfo.
 
Old 01-07-2011, 04:09 AM   #4
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hi,

Open a mysql session from terminal:
Code:
mysql -uroot -p
that'll show you the version of MySQL server you're running
Code:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.0.77 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
Kind regards,

Eric
 
Old 01-07-2011, 04:35 AM   #5
elainelaw
Member
 
Registered: Jan 2008
Posts: 258

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by novice06 View Post
If you use rpm based linux
rpm -qi mysql
You can find
Version : 5.0.77
I am not use rpm
 
Old 01-07-2011, 04:37 AM   #6
elainelaw
Member
 
Registered: Jan 2008
Posts: 258

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by EricTRA View Post
Hi,

Open a mysql session from terminal:
Code:
mysql -uroot -p
that'll show you the version of MySQL server you're running
Code:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.0.77 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
Kind regards,

Eric
I tried root password but not work , can advise what is the mysql password ?

#mysql -uroot -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib
/mysql/mysql.sock' (2)
 
Old 01-07-2011, 04:44 AM   #7
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 616

Rep: Reputation: 64
Quote:
Originally Posted by elainelaw View Post
I tried root password but not work , can advise what is the mysql password ?

#mysql -uroot -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib
/mysql/mysql.sock' (2)
The default socket mysql is using to connect is not valid, may be you have more than one Mysql installed in your system. Find the valid socket and run the command again with --socket=path_to_valid_socket

Last edited by Sayan Acharjee; 01-07-2011 at 04:47 AM.
 
Old 01-07-2011, 04:44 AM   #8
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hello,

Have you not set a password for the MySQL root user? Try without the -p option, like this:
Code:
mysql -uroot
If you get a prompt like this:
Code:
mysql>
then you're at the mysql console.

I advise you to set a password for the MySQL root user if your server is a production server or accessible from the outside. Of course if you already have applications (PHPMyAdmin or so) in place you'll have to change their configuration accordingly if you set a password.

A password for MySQL (if not set before) can be set using:
Code:
mysqladmin -u root password YOURPASSWORD
Kind regards,

Eric
 
Old 01-07-2011, 04:55 AM   #9
novice06
Member
 
Registered: Mar 2006
Location: Singapore
Distribution: RHEL, CentOS
Posts: 132

Rep: Reputation: 23
Can you check your mysql process is running
ps aux |grep mysql
Seem like it is not running. So that you cannot connect with mysql client
 
Old 01-07-2011, 06:03 AM   #10
danielle
LQ Newbie
 
Registered: Oct 2010
Location: Beijing
Distribution: Fedora
Posts: 8

Rep: Reputation: 0
Hi,
after entering the mysql console, try this:
Code:
mysql> select version();
that would show the server's version
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
migrating MySql DB from version 4.0 to version 5.1 d-niX Linux - Server 4 11-30-2010 07:22 AM
cannot open mysql gui on mysql version 6.0 vitalstrike82 Slackware 6 05-31-2009 12:37 AM
mysql version Rainel Linux - Newbie 1 09-12-2007 05:45 AM
can't make mysql command run the right mysql version crimson.dynamo Linux - Newbie 9 06-20-2007 10:36 AM
MySql version OverrRyde Mandriva 4 12-27-2005 05:42 PM


All times are GMT -5. The time now is 04:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration