Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
edit the root mysql access password:
Old 05-10-2007, 04:41 AM edit the root mysql access password:
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 960
Name: Darren
Location: England
Trades: 0
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 Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."
rolda hayes is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-10-2007, 05:34 AM Re: edit the root mysql access password:
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
from the shell

edit -r filename

should open the file as read only
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 05-10-2007, 05:39 AM Re: edit the root mysql access password:
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
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!
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 05-10-2007, 05:56 AM Re: edit the root mysql access password:
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 960
Name: Darren
Location: England
Trades: 0
Chris,

its coming back as "command not found" ?
__________________
I Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."
rolda hayes is offline
Reply With Quote
View Public Profile
 
Old 05-10-2007, 05:57 AM Re: edit the root mysql access password:
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
Try pico filename

-- Oh, and don't save. Ctrl+x will exit
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE

Last edited by JeremyMiller; 05-10-2007 at 05:59 AM..
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 05-10-2007, 06:03 AM Re: edit the root mysql access password:
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Or you can do a
Code:
less filename
if pico is not installed.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 05-10-2007, 06:23 AM Re: edit the root mysql access password:
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 960
Name: Darren
Location: England
Trades: 0
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 Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."
rolda hayes is offline
Reply With Quote
View Public Profile
 
Old 05-10-2007, 06:57 AM Re: edit the root mysql access password:
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
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
__________________
Only a biker knows why a dog sticks his head out the window.

Last edited by tripy; 05-10-2007 at 06:58 AM..
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 05-10-2007, 10:52 AM Re: edit the root mysql access password:
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 960
Name: Darren
Location: England
Trades: 0
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 Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."
rolda hayes is offline
Reply With Quote
View Public Profile
 
Old 05-10-2007, 11:36 AM Re: edit the root mysql access password:
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
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
__________________
Only a biker knows why a dog sticks his head out the window.

Last edited by tripy; 05-10-2007 at 11:38 AM..
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 05-10-2007, 12:54 PM Re: edit the root mysql access password:
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 960
Name: Darren
Location: England
Trades: 0
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 Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."
rolda hayes is offline
Reply With Quote
View Public Profile
 
Old 05-10-2007, 01:26 PM Re: edit the root mysql access password:
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 960
Name: Darren
Location: England
Trades: 0
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 Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."
rolda hayes is offline
Reply With Quote
View Public Profile
 
Old 05-10-2007, 01:38 PM Re: edit the root mysql access password:
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 960
Name: Darren
Location: England
Trades: 0
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 Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."
rolda hayes is offline
Reply With Quote
View Public Profile
 
Old 05-10-2007, 03:37 PM Re: edit the root mysql access password:
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
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.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 05-10-2007, 03:57 PM Re: edit the root mysql access password:
ForrestCroce's Avatar
Half Man, Half Amazing

Posts: 3,023
Name: Forrest Croce
Location: Seattle, WA
Trades: 0
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.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Old 05-11-2007, 05:44 AM Re: edit the root mysql access password:
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 960
Name: Darren
Location: England
Trades: 0
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 Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."
rolda hayes is offline
Reply With Quote
View Public Profile
 
Old 05-11-2007, 05:57 AM Re: edit the root mysql access password:
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 960
Name: Darren
Location: England
Trades: 0
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 Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."
rolda hayes is offline
Reply With Quote
View Public Profile
 
Old 05-11-2007, 06:05 AM Re: edit the root mysql access password:
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
you have to kill the running mysql process.
The command depend of which process you have started, mysqld or mysqld_safe.
You can do a
Code:
 ps -e
to see the running process, and search for it. Then,
Code:
 killall mysqld
or
Code:
killall mysqld_safe
, and then restart it with a
Code:
service mysqld start
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Reply     « Reply to edit the root mysql access password:
 

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.60158 seconds with 12 queries