I'd Lost My MySQL Priviliges

Discussion of programming on Linux, including shell scripting, perl, python, c/c++, mono, java. Whatever tickles your fancy.
lambda
Major General
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Location: Lahore
Contact:

Re: the same problem

Postby lambda » Sun Dec 18, 2005 1:19 am

zAm wrote:LinuxFreak ... the same problem exists again with the cmd which u told me .................. any idea ??


the problem is with you. you were told to stop mysqld, run the safe_mysqld command, run mysql to set the perms/whatever, then start mysqld. you were told to do that several times. and yet, you stopped mysqld, ran the safe_mysqld command, and then started mysqld, all before running the mysql command.

do you see where you made the mistake?

LinuxFreaK
Site Admin
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
Location: Karachi
Contact:

Re:

Postby LinuxFreaK » Mon Dec 19, 2005 12:57 am

Dear zAm,
Salam,

I think you read lambda last reply carefully :)

Best Regards.
Farrukh Ahmed

zAm
Havaldaar
Posts: 148
Joined: Wed Oct 19, 2005 9:28 am
Location: Pakistan, Karachi
Contact:

lambda , here's what i've got in bash prompt.

Postby zAm » Tue Dec 20, 2005 2:39 pm

Hello,
Lambda ... i really don't understand what you & LinuxFreak trying to explain ...... you guys told me to stop the mysqld service , i did ... then you were suppose to tell me to run the safe_mysqld command , i did that too ..... & then you told me to type mysql on bash prompt , just think for a while , a few moments later u told me to stop the mysqld service then how come i use 'mysql' , anyway's here's what i got in my bash prompt.

Code: Select all

[root@lyarianz ~]# service mysqld stop
Stopping MySQL:                                            [  OK  ]
[root@lyarianz ~]# /usr/bin/safe_mysqld --skip-grant-tables --old-passwords --user=mysql &
[1] 11135
[root@lyarianz ~]# Starting mysqld daemon with databases from /var/lib/mysql
051220 13:15:36  mysqld ended


[1]+  Done                    /usr/bin/safe_mysqld --skip-grant-tables --old-passwords --user=mysql
[root@lyarianz ~]# mysql
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

here's that , ? now look at this , how come mysql start as i stopped the mysqld service. anyway's thanks alot for your replies ........ any idea ? to help me out ...... please........
Regards,
zAm (Lyarianz Internet Cable Network)
Proud To Be Lyarianz !

LinuxFreaK
Site Admin
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
Location: Karachi
Contact:

Re:

Postby LinuxFreaK » Wed Dec 21, 2005 9:06 am

Dear zAm,
Salam,

I am sure you have messed up with your dbs :)

# cd /var/lib
# mv mysql mysql.old
# mkdir mysql
# chown -R mysql.mysql mysql
# service mysql start
# /usr/bin/mysql_install_db
# mysql


Best Regards.
Farrukh Ahmed

lambda
Major General
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Location: Lahore
Contact:

Re: lambda , here's what i've got in bash prompt.

Postby lambda » Wed Dec 21, 2005 12:39 pm

Code: Select all

[root@lyarianz ~]# service mysqld stop
Stopping MySQL:                                            [  OK  ]

good so far.

Code: Select all

[root@lyarianz ~]# /usr/bin/safe_mysqld --skip-grant-tables --old-passwords --user=mysql &
[1] 11135
[root@lyarianz ~]# Starting mysqld daemon with databases from /var/lib/mysql

also okay.

Code: Select all

051220 13:15:36  mysqld ended

[1]+  Done                    /usr/bin/safe_mysqld --skip-grant-tables --old-passwords --user=mysql

oops! why did it end? check the log files in /var/lib/mysql.

Code: Select all

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

understandable, since the server's already ended. which it wasn't supposed to do.

so now you have to figure out why it ended like that. the logs will help.

zAm
Havaldaar
Posts: 148
Joined: Wed Oct 19, 2005 9:28 am
Location: Pakistan, Karachi
Contact:

okay , it's solved .......

Postby zAm » Thu Dec 22, 2005 9:40 pm

Hello,
lamda & LinuxFreak ... thanks for the replies.............. i did it ;-) i've solved the problem of mysql with genuine way out :p I un-installed mysql & then re-installed it :p , it's fine now ........ anyway's thanks once again for your kind support .. & sorry about for bothering you... anyway's ... take care , Allah Hafiz
Regards,
zAm (Lyarianz Internet Cable Network)
Proud To Be Lyarianz !

LinuxFreaK
Site Admin
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
Location: Karachi
Contact:

Re: okay , it's solved .......

Postby LinuxFreaK » Sat Dec 24, 2005 8:57 am

Dear zAm,
Salam,

zAm wrote:lamda & LinuxFreak ... thanks for the replies.............. i did it ;-) i've solved the problem of mysql with genuine way out :p I un-installed mysql & then re-installed it :p , it's fine now ........ anyway's thanks once again for your kind support .. & sorry about for bothering you...


We did not said you are bothering us. Yes Installing RPM package will do same which i have told you it will create database. After Installing package.

Best Regards.
Farrukh Ahmed


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests