LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-29-2003, 12:17 AM   #1
Tarential
LQ Newbie
 
Registered: Feb 2003
Distribution: Too Many To List
Posts: 29

Rep: Reputation: 15
MySQL default root password on Slack 9?


bash-2.05b# mysqladmin -u root -p password 'new-password'
Enter password:
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost' (Using password: YES)'


Run as root... System is running Slackware 9.0, default install pretty much all the way with a few slight mods to things not pertaining to MySQL or PHP or Apache.

mysqld is indeed up and running, the process is up (when I run safe_mysqld I get "error, process already exists").

Any suggestions, anyone?
 
Old 05-29-2003, 08:40 AM   #2
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
You can check the MySQL manual for additional info, but at first install, root doesn't have a password. You might try mysqladmin -u root and see where that gets you
 
Old 05-29-2003, 10:05 AM   #3
Tarential
LQ Newbie
 
Registered: Feb 2003
Distribution: Too Many To List
Posts: 29

Original Poster
Rep: Reputation: 15
mysqladmin -u root

That prints out the syntax help for mysqladmin.

I can connect to the local server just fie with "mysql" but I don't know how to add a user to use with my php files.
 
Old 05-29-2003, 11:16 AM   #4
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
[QUOTE}I don't know how to add a user to use with my php files.[/QUOTE]

In which case, check out the MySQL manual for how to add users from within MySQL.
 
Old 05-29-2003, 11:30 AM   #5
Evilone
Member
 
Registered: Oct 2002
Location: UK
Distribution: Slack 9.1 (2.6.5)
Posts: 307

Rep: Reputation: 30
its mysql -u root -p actually !!!!

But to get up and running try this :

Further notes on mysql:
From an initial Slack install the databases have to be created for the users, typing:
mysql_install_db

should create the tables but then the owner for these files needs to be changed to 'mysql' instead of root.
The files in question are in /var/lib/mysql and the owner and group both need to be set to mysql ie:

cd var/lib/mysql
chown -R mysql:mysql mysql

Mysql can then be started:
safe_mysqld &

Lemme know if this is ok


Oops missed a bit :

and mysqladmin used to change the root password:

mysqladmin -u root password 'new-password'

Other users can then be setup on mysql by logging in and then using:

grant all on * to fred identified by 'pass' with grant option;
This would grant all privileges on all db's to fred, see page 192 of PHP and MySQL.

mysqladmin should me mysql i think, but should work both ways , i swear i used mysql not mysqladmin. !!

Last edited by Evilone; 05-29-2003 at 11:36 AM.
 
Old 05-29-2003, 11:40 AM   #6
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
Quote:
mysql -u root -p actually
Yeah, I blew that one. That said, the correct syntax fo myqladmin would be mysqladmin -u=root -p command.

And looking through what mysqladmin commands are available, adding a user isn't one of them so the only way to do it is through mysql.


EDIT

I should add that the MySQL control center has a nice graphical way to add users

Last edited by Hangdog42; 05-29-2003 at 11:47 AM.
 
Old 05-29-2003, 07:14 PM   #7
Tarential
LQ Newbie
 
Registered: Feb 2003
Distribution: Too Many To List
Posts: 29

Original Poster
Rep: Reputation: 15
Figured it out... bleh long story.

Thanks for you help.
 
  


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
default root password tuxmanfromindia Ubuntu 4 10-12-2005 02:52 PM
Get Slack to ask for root password skruf_man Slackware 5 09-24-2004 02:55 PM
Default root password thejazzman Linare 4 09-17-2004 03:46 PM
default root password shanenin Linux - Software 0 09-07-2004 10:27 AM
Default root password for Knoppix STD??? madh@ter Linux - Newbie 1 08-27-2004 12:13 PM


All times are GMT -5. The time now is 10:15 AM.

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