LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   MySQL questions (https://www.linuxquestions.org/questions/linux-software-2/mysql-questions-54088/)

Thinkgeekness 04-08-2003 06:49 PM

MySQL questions
 
Hey, I have mysql4 installed from the binary file, and I am having some problems.

1. When I try to create a password for root I get:
# ./bin/mysql -u root -p

I get the following message:
Error 1045: Access denied for user: 'root@localhost' (Using password: YES)

What is error 1045?

2. How do I create a database?

3. How do I join MySQL and PHP? I am going to use phpBB.

thanks.

Thinkgeekness 04-08-2003 07:10 PM

Re: MySQL questions
 
[QUOTE]Originally posted by Thinkgeekness
1. When I try to create a password for root I get:
# ./bin/mysql -u root -p

I get the following message:
Error 1045: Access denied for user: 'root@localhost' (Using password: YES)

What is error 1045?
[QUOTE] Well, I figured out the first one... It was that I didnt have a password. So my question will now be how do I create a password? Also, how do I create a username and password?

madcoder 04-08-2003 08:36 PM

to change your root mysql password, do the following:

% mysqladmin -u root password <your-desired-password>

that will set the root password,,,

now, to add a new user:

% mysql -u root -p
<type your password>

mysql> GRANT ALL on <databasename or *>.<tables or *> TO <username>@<hostname (try localhost)> IDENTIFIED BY "<password>";

if you want the user to be able to grant other users access, append WITH GRANT OPTION to the end of the last command.

*'s above represent wildcards.

Thinkgeekness 04-08-2003 09:04 PM

Thanks! Now I have no more questions about mysql, well, for now.

Thanks again!


All times are GMT -5. The time now is 01:45 PM.