Jump to content

MySQL


Jas
 Share

Recommended Posts

kk, earlier on i realized mysql wasnt installed, so i did urpmi mysql

it installed, but i cant do anything, all i get is:

 

[root@localhost /]# mysql
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

 

someone help plz :thanks:

Link to comment
Share on other sites

This usually indicates that you have not started the mysql service - try these fixes

 

In X environment:

Control Center > System > Services - then find the mysql daemon and start it tagging 'run at boot' if you want it to start at boot.

 

OR

 

At the Command line:

 

As root user type - 'service mysqld start' with no quotes ( I am pretty sure this is it, if not it is 'service mysql start')

 

Hope this helps

Link to comment
Share on other sites

okay, just tried it, it was already checked to start on boot and was running, went to konsole and got:

 

[root@localhost jas]# service mysql start
Starting MySQL Server                                           [  OK  ]
[root@localhost jas]# mysql
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

 

:(

Link to comment
Share on other sites

I think there's a whole lot more to it than that. If you meant to get a gui by typing mysql, that wont work. In the install docs and tutorials I've read, you'll need to creat a user mysql and maybe a group as well, but I think if you try the mysql site or news syndication sites like linuxtoday.com you may find a more detailed way to get mysql to be usable, and you'll need to install a front end as well, unless you want to type everything in the terminal.

 

Good luck,

Robert

Link to comment
Share on other sites

First, find out if you have a mysql.sock to conect to. Open a consol as root, then type

find / -name mysql.sock

Should be one in /var/lib/mysql/ or /var/tmp/ If you don't have one, you will need to reinstall Mysql.

If you do have one listed, then edit /etc/my.cnf to point to where the socket is.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...