edit the root mysql access password:
05-10-2007, 04:41 AM
|
edit the root mysql access password:
|
Posts: 593
Name: Darren
Location: England
|
Recently my server went down and now when back up, the database section in my matrix control panel is asking for a username and password.
Ive contacted support and they want to charge £70 to retrieve this as they say I must have changed it from the default??? Now I know I haven't as I don't know how to!!!
I found this in the help pages...
The web administration tool stores the MySQL root user password in the file /etc/matrixsa/webadmin.ini
Now I know how to call up the ect folder using SSH but how do I call up and view the webadmin.ini file so I can see what this ilusive password is??
Cheers
__________________
"I always wanted the adoration of John Lennon - With The Anonimity of Ringo Starr..."
QuizBay Help with the testing of this Beta site!
|
|
|
|
05-10-2007, 05:34 AM
|
Re: edit the root mysql access password:
|
Posts: 15,326
Location: Blackpool. UK
|
from the shell
edit -r filename
should open the file as read only
|
|
|
|
05-10-2007, 05:39 AM
|
Re: edit the root mysql access password:
|
Posts: 1,005
Name: Jeremy Miller
Location: Reno, NV
|
Oh wow - this came in handy. A friend of mine just had the same issue w/ her root mysql password (totally forgot it and deleted the PHPMyAdmin file that had it!).
Thanks you 2!
|
|
|
|
05-10-2007, 05:56 AM
|
Re: edit the root mysql access password:
|
Posts: 593
Name: Darren
Location: England
|
Chris,
its coming back as "command not found" ?
__________________
"I always wanted the adoration of John Lennon - With The Anonimity of Ringo Starr..."
QuizBay Help with the testing of this Beta site!
|
|
|
|
05-10-2007, 05:57 AM
|
Re: edit the root mysql access password:
|
Posts: 1,005
Name: Jeremy Miller
Location: Reno, NV
|
Try pico filename
-- Oh, and don't save. Ctrl+x will exit
Last edited by JeremyMiller : 05-10-2007 at 05:59 AM.
|
|
|
|
05-10-2007, 06:03 AM
|
Re: edit the root mysql access password:
|
Posts: 2,171
Name: Thierry
Location: In the void
|
Or you can do a
if pico is not installed.
__________________
Listen to the ducky: "This is awesome!!!"
|
|
|
|
05-10-2007, 06:23 AM
|
Re: edit the root mysql access password:
|
Posts: 593
Name: Darren
Location: England
|
its showing as:
[mysql]
user_privileges = SELECT
admin_user_password =
dbo_privileges = SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDE X,CREATE TEMPORARY TABLES,LOCK TABLES
admin_username = root
i read in the help pages that the password is set to "blank" as default but still cant login through it. Can I add a password?
__________________
"I always wanted the adoration of John Lennon - With The Anonimity of Ringo Starr..."
QuizBay Help with the testing of this Beta site!
|
|
|
|
05-10-2007, 06:57 AM
|
Re: edit the root mysql access password:
|
Posts: 2,171
Name: Thierry
Location: In the void
|
This would mean that your database root account have no password...
:-/
from the shell, try
Code:
mysql -u root mysql
If it don't say you cannot login without password, it means your db isn't protected.
In that case, do this to set a new password:
Code:
mysqladmin -u root password NEWPASSWORD
If you cannot login your db, take a look here for a tutorial on mysql emergency password recovery:
http://www.debian-administration.org/articles/442
__________________
Listen to the ducky: "This is awesome!!!"
Last edited by tripy : 05-10-2007 at 06:58 AM.
|
|
|
|
05-10-2007, 10:52 AM
|
Re: edit the root mysql access password:
|
Posts: 593
Name: Darren
Location: England
|
No, I cant follow that tutorial as it wont let me log into anything.
Support have said to uninstall mysql using yum then reinstall but this has left me even more confused!!
__________________
"I always wanted the adoration of John Lennon - With The Anonimity of Ringo Starr..."
QuizBay Help with the testing of this Beta site!
|
|
|
|
05-10-2007, 11:36 AM
|
Re: edit the root mysql access password:
|
Posts: 2,171
Name: Thierry
Location: In the void
|
Do NOT re-install mysql...
I don't know Yum, but if it delete the old datas, all your db's will be gone after that...
Read all the article, they don't speak about only 1 method.
Quote:
root@steve:~# /usr/bin/mysqld_safe --skip-grant-tables &
[1] 6702
Starting mysqld daemon with databases from /var/lib/mysql
mysqld_safe[6763]: started
Here you can see the new job (number "1") has started and the server is running with the process ID (PID) of 6702.
Now that the server is running with the --skip-grant-tables flag you can connect to it without a password and complete the job:
root@steve:~$ mysql --user=root mysql
|
__________________
Listen to the ducky: "This is awesome!!!"
Last edited by tripy : 05-10-2007 at 11:38 AM.
|
|
|
|
05-10-2007, 12:54 PM
|
Re: edit the root mysql access password:
|
Posts: 593
Name: Darren
Location: England
|
ok im working my way through but am getting this when i try to stop mysql
[root@localhost init.d]# cd mysql stop
-bash: cd: mysql: No such file or directory
[root@localhost init.d]# mysql stop
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
__________________
"I always wanted the adoration of John Lennon - With The Anonimity of Ringo Starr..."
QuizBay Help with the testing of this Beta site!
|
|
|
|
05-10-2007, 01:26 PM
|
Re: edit the root mysql access password:
|
Posts: 593
Name: Darren
Location: England
|
FIXED IT!!!!
it was because im on a Fedora server that i couldnt stop it.
had to use the command:
#service mysqld stop
then use
# /etc/init.d/mysql stop
# /usr/bin/mysqld_safe --skip-grant-tables --skip-networking &
# mysql -u root
mysql> use mysql;
mysql> UPDATE user SET Password=PASSWORD("your password here") WHERE User="root";
(not bad for someone who only started using shell commands this morning!)
Cheers for all your help in getting this sorted...
*runs off to fire off a grumpy email to my server company about the lack of support*
__________________
"I always wanted the adoration of John Lennon - With The Anonimity of Ringo Starr..."
QuizBay Help with the testing of this Beta site!
|
|
|
|
05-10-2007, 01:38 PM
|
Re: edit the root mysql access password:
|
Posts: 593
Name: Darren
Location: England
|
I DONT BELIEVE IT!!!!!
since logging out of the control panel and then back in, its doing the same!!!
Is there anything i should have done to save the shell session??
__________________
"I always wanted the adoration of John Lennon - With The Anonimity of Ringo Starr..."
QuizBay Help with the testing of this Beta site!
|
|
|
|
05-10-2007, 03:37 PM
|
Re: edit the root mysql access password:
|
Posts: 2,171
Name: Thierry
Location: In the void
|
Nope, nothing else have to be done.
I don't see why it's back to it's previous state though. Once you have done the password update, it's fixed, until another update...
Did you remember having installed something recently on your server ? Maybe there is a rogue script that update the mysql root password...
Or you may have been hacked, and a process take care to update the password at given times, to prevent you to close access to it....
Try to install "rootkit hunter", or "rkhunter". It's a programm that will scan essential files of your system and check if it finds special known rootkits signatures.
http://linuxhelp.blogspot.com/2006/1...otkits-in.html
Quote:
|
A rootkit is a collection of tools a hacker installs on a victim computer after gaining initial access. It generally consists of network sniffers, log-cleaning scripts, and trojaned replacements of core system utilities such as ps, netstat, ifconfig, and killall.
|
__________________
Listen to the ducky: "This is awesome!!!"
|
|
|
|
05-10-2007, 03:57 PM
|
Re: edit the root mysql access password:
|
Posts: 3,024
Name: Forrest Croce
Location: Seattle, WA
|
Try it again, see if it reverts again. But before you close out after changing the password, make a full backup if you're able to.
Good luck. Sorry I don't know more about MySQL to give better advice.
|
|
|
|
05-11-2007, 05:44 AM
|
Re: edit the root mysql access password:
|
Posts: 593
Name: Darren
Location: England
|
Did it again and it seems ok for now but when i try to add a database i get
1290, 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement'
How to I turn it back on?
__________________
"I always wanted the adoration of John Lennon - With The Anonimity of Ringo Starr..."
QuizBay Help with the testing of this Beta site!
|
|
|
|
05-11-2007, 05:57 AM
|
Re: edit the root mysql access password:
|
Posts: 593
Name: Darren
Location: England
|
Did it again and it seems ok for now but when i try to add a database i get
1290, 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement'
How to I | |