List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:September 17 1999 11:35pm
Subject:MySQL access
View as plain text  
>>>>> "XiaoYan" == XiaoYan Zhang <xyz@stripped> writes:

>> Description:
XiaoYan> 	I installed MySQL on my local home area in our department UNIX 
XiaoYan> 	network. In this way I am the only user, but I need to access 
XiaoYan> 	MySQL from different hosts on department network. I modified the 
XiaoYan> 	bin/mysqlaccess.conf file as follows:

XiaoYan> # ----------------#
XiaoYan> # Global settings #
XiaoYan> # --------------- #
XiaoYan>   #$Param{'host'}     = '';
XiaoYan>   $Param{'user'}     = 'nobody';
XiaoYan>   $Param{'db'}       = 'test';
XiaoYan>   $Param{'password'} = 'foobar';
XiaoYan>   $Param{'debug'}    = 0;

XiaoYan> # --------------------------#
XiaoYan> # Settings for Command-line #
XiaoYan> # ------------------------- #
XiaoYan> if ($CMD) {
XiaoYan>   $Param{'superuser'} = 'xyz';
XiaoYan>   $Param{'rhost'}     = 'cetus2a';
XiaoYan>   $Param{'spassword'} = 'xxxx';
XiaoYan>   $Param{'brief'}     = 1;
XiaoYan> # ---------------------#
XiaoYan> # Settings for CGI-BIN #
XiaoYan> # -------------------- #
XiaoYan> if ($CGI) {
XiaoYan>   $Param{'superuser'}  = 'root';
XiaoYan>   $Param{'rhost'}      = 'localhost';
XiaoYan>   $Param{'spassword'}  = '';
XiaoYan>   $Param{'table'}      = 1;
XiaoYan> }

XiaoYan> 1;  #to make require happy

XiaoYan> Now I can start the mysqld on cetus2a (a local host), but I cann't access the
> databases I previously created on another local host, also I cann't create a new database
> on cetus2a either:
mysql> CREATE database Class;
mysql> ERROR 1044: Access denied for user:'@localhost' to database 'Class'.

>> Fix:
XiaoYan>  I guess the problem exists on the mysqlaccess.conf file, but I am not sure
> which parameter I should keep or modify.


Note that mysqlaccess.conf has nothing to do with the MySQL
privileges.  The MySQL privileges are stored in the tables in the
mysql database.

Try starting mysql as root:

mysql -u root --password=your_root_password

and try create the database from here!

You should also read the 'Access denied' section in the MySQL manual!


*************** Warning commercial signature follows **********
If you like TCX's concept of a 'mostly free' database and free
advice, you should at least CONSIDER supporting us, so that we can
afford to continue this service up.
MySQL accessXiaoYan Zhang16 Sep
  • MySQL accessMichael Widenius18 Sep