I'm having a problem with setting MySQL properly with a user to administrate MySQL:
I have compiled MySQL on Slackware Linux 8.1 on a laptop I have up and running right next to me.
Here's the steps, that I went through to get MySQL compiled and installed on the laptop:
1. Downloaded the MySQL source package from the MySQL website www.mysql.com
2. Created a group called mysql: groupadd mysql
3. Created a user called mysql: useradd mysql mysql
4. Untarred and Ungzipped: tar zxvf mysql-3.23.51.tar.gz
5. Change to the mysql-3.23.51
directory: cd mysql-3.23.51
6. Set the options for the configure script: ./configure --prefix=/usr/local/mysql
7. Started Compiling MySQL: make
8. Installed MySQL: make install
9. Changed to scripts
directory and typed./mysql_install_db
10. Changed to the directory called support-files
: cd ../support-files
11. Copied the file named my-medium.cnf to /etc
directory as mysql.cnf: cp my-medium.cnf /etc/mysql.cnf
12. Changed the ownership (and all the subdirectories) /usr/local/mysql
to root: chown -R root /usr/local/mysql
13. Changed the ownership of /usr/local/mysql/var
(and all the subdirectories)
to mysql: chown -R mysql /usr/local/mysql/var
14. Changed the group ownership of /usr/local/mysql
chgrp -R mysql /usr/local/mysql
15. Changed to /usr/local/mysql/bin cd /usr/local/mysql/bin
16. Typed: ./safe_mysqld --user=mysql &
(I pretty sure this is run the mysqld daemon)
Message Output from ./safe_mysqld --user=mysql &
on bash console/ternimal:
Starting mysqld daemon with databases from /usr/local/mysql/var
17. Changed to another console (Alt-F2) and logged in as the root user.
18. Changed to the root (/) directorycd /
19. Made a symlink to /usr/local/mysql/bin to make it easier for myself
: ln -s /usr/local/mysql/bin MYSQL
20. Then I tried the following to create a database:
./mysqladmin --user=mysql -p CREATE test2
and then typed in the password when it asked me to.
./mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'mysql@localhost' (Using password: YES)'
Sorry it's SO long, THANKS a LOT a in advance.