LinuxQuestions.org
Help answer threads with 0 replies.
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 07-26-2003, 09:34 AM   #1
raymond
Member
 
Registered: Nov 2002
Location: d
Posts: 63

Rep: Reputation: 15
About MySQL server


Hi there.
I recently tried to learn how to set up mysql server in my Redhat 9 box. I followed a reference book demonstrating how to locate and start mysql server by typing at the shell:
>locate mysql.server ; and
>./mysql.server start

However, I could not locate mysql.server and also could not use the ./mysql.server to start the server.

Can anyone tell me where on earth mysql.server is located and how to start it up?

Cheers.
 
Old 07-26-2003, 11:16 AM   #2
Looking_Lost
Senior Member
 
Registered: Apr 2003
Location: Eire
Distribution: Slackware 12.0, OpenSuse 10.3
Posts: 1,120

Rep: Reputation: 45
If you installed it off from RPM or from your disks should be mysqld


/etc/init.d/mysqld start

or

/usr/bin/safe_mysqld
 
Old 07-30-2003, 06:28 AM   #3
raymond
Member
 
Registered: Nov 2002
Location: d
Posts: 63

Original Poster
Rep: Reputation: 15
Hi there. It really confused much!
I started, as you advised, the mysql server and as a root, typed at the shell 'mysql' and the system prompted me with the following message.
error 2002: can't connect to local mysql server through socket 'var/lib/mysql/mysql.sock'(2)!
I also followed the procedures as to how to set the password for the root but still it failed.
Can anyone please tell me what did I miss?
Cheers.
 
Old 07-30-2003, 07:56 AM   #4
Looking_Lost
Senior Member
 
Registered: Apr 2003
Location: Eire
Distribution: Slackware 12.0, OpenSuse 10.3
Posts: 1,120

Rep: Reputation: 45
I've only ever started it using the

/etc/init.d/mysqld start

format

Assuming it's installed from RPM the inital configuration file is pretty sparse
and has causedproblems for me in the past

make a backup of the one you got the now

mv /etc/my/cnf /etc/my.cnf.old

copy one of the example one's provided

cp /usr/share/doc/mysql-server-3.23.56/my-medium.cnf /etc/my.cnf

change mysql-server-3.23.56 for the version directory you've got if it's different

Just to be on the safe side reboot and try and start it again using format up the top.

I hope that helps.
 
Old 07-30-2003, 11:04 AM   #5
oubipaws
Member
 
Registered: Mar 2003
Location: Frederick, MD
Distribution: Dux Linux 1 / Gentoo 1.4
Posts: 77

Rep: Reputation: 15
su - root
'setup'
open system services
mark 'mysqld'
exit
reboot

mysql will start up every time you start up
 
Old 07-30-2003, 11:06 AM   #6
raymond
Member
 
Registered: Nov 2002
Location: d
Posts: 63

Original Poster
Rep: Reputation: 15
Hi there. Thanks for your prompt reply.
Well, it seems I've sorted first problem out. Now I've got another one when I issued the command >mysql -u root OR mysqladmin -u root password "newpassword"

I got the following error message:

ERRORr 1045 : Access denied for user: 'root@localhost' (Using password: NO)

What else can I do?
Cheers.
 
Old 07-30-2003, 11:16 AM   #7
Looking_Lost
Senior Member
 
Registered: Apr 2003
Location: Eire
Distribution: Slackware 12.0, OpenSuse 10.3
Posts: 1,120

Rep: Reputation: 45
On first run just use

mysql

without any other parameters
 
Old 07-30-2003, 11:15 PM   #8
raymond
Member
 
Registered: Nov 2002
Location: d
Posts: 63

Original Poster
Rep: Reputation: 15
Hi there.
I did try 'mysql' without any other parameters command at the shell at first but it kept prompting me with "ERROR 1045 : Access denied for user: 'root@localhost' (Using password: NO)"!
I thought I might have missed something.
Any advice?
Cheers.
 
Old 07-31-2003, 02:17 AM   #9
Looking_Lost
Senior Member
 
Registered: Apr 2003
Location: Eire
Distribution: Slackware 12.0, OpenSuse 10.3
Posts: 1,120

Rep: Reputation: 45
I don't know if you've already been trying to set passwords and users by either way try the link below, maybe you've already seen, only difference in procedure should be you'll do
service mysqld stop
probably

mysql root problem
 
Old 07-31-2003, 05:00 AM   #10
Looking_Lost
Senior Member
 
Registered: Apr 2003
Location: Eire
Distribution: Slackware 12.0, OpenSuse 10.3
Posts: 1,120

Rep: Reputation: 45
Oops, just before you try that above you've set a password for root yeah,

try logging in like

mysql -u root -p

then it should prompt you for a password

if not then....
 
Old 08-03-2003, 11:06 AM   #11
raymond
Member
 
Registered: Nov 2002
Location: d
Posts: 63

Original Poster
Rep: Reputation: 15
Hmm...Bingo!
I tried 'mysql -u root -p' first and it prompted me to enter the password and...I entered the new PW and I got it!
Thank you very much indeed.
Cheers.
 
Old 08-03-2003, 11:11 AM   #12
Looking_Lost
Senior Member
 
Registered: Apr 2003
Location: Eire
Distribution: Slackware 12.0, OpenSuse 10.3
Posts: 1,120

Rep: Reputation: 45
I should have spotted it ages ago, shame on me, but all's well that end's well as they say
 
  


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
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. NoviceW Linux - Networking 17 09-17-2014 03:13 PM
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock welery Linux - Software 19 03-06-2014 08:19 AM
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. suziecorbett Linux - Software 8 10-09-2008 02:52 AM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 09:44 AM
Fedora Core 3, MySql Server, mysql started mysql ended OkiTek Fedora 30 01-28-2005 10:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:43 PM.

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