LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   About MySQL server (https://www.linuxquestions.org/questions/linux-newbie-8/about-mysql-server-76084/)

raymond 07-26-2003 08:34 AM

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.

Looking_Lost 07-26-2003 10:16 AM

If you installed it off from RPM or from your disks should be mysqld


/etc/init.d/mysqld start

or

/usr/bin/safe_mysqld

raymond 07-30-2003 05:28 AM

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.

Looking_Lost 07-30-2003 06:56 AM

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.

oubipaws 07-30-2003 10:04 AM

su - root
'setup'
open system services
mark 'mysqld'
exit
reboot

mysql will start up every time you start up

raymond 07-30-2003 10:06 AM

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.

Looking_Lost 07-30-2003 10:16 AM

On first run just use

mysql

without any other parameters

raymond 07-30-2003 10:15 PM

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.

Looking_Lost 07-31-2003 01:17 AM

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

Looking_Lost 07-31-2003 04:00 AM

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....

raymond 08-03-2003 10:06 AM

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.

Looking_Lost 08-03-2003 10:11 AM

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


All times are GMT -5. The time now is 05:17 AM.