|
Blue Forest http://www.lslnet.com at 3:18 p.m. on August 26, 2006
MySQL has the authority [to get, I would like to thank rardge]
OS:FreeBSD 6.0 RELEASE
MySQL:4.1.18
From the ports installed, the source compiler is downloaded from the official web site for the installation, configuration files installed in accordance with the recommendation :
[code]
Pw groupadd mysql #
Pw useradd mysql g # mysql
#. /configure CFLAGS= "-O3" CXX=gcc CXXFLAGS= "-O3 -felide-constructors -fno-exceptions -fno-rtti" --prefix=/usr/local/mysql --enable-assembler --with-mysqld-ldflags=-all-static
# Make
# Make install
# Cp support-files/my-medium.cnf /etc/my.cnf
# Cd /usr/local/mysql
# Bin/mysql_install_db --user=mysql
# Chown-R root.
# Chown-R mysql var
# Chown-R mysql.
Bin/mysqld_safe --user=mysql & #
[/code]
Then
[code]
# U root /usr/local/mysql/bin/mysql
Mysql>use mysql;
Mysql>delete from user;
Mysql>grant all on the indicators shown as *.* to root@localhost identified by the "password";
Mysql>grant all on firstdb.* to first@localhost identified by the "first";
Mysql>grant all on seconddb.* to second@localhost identified by the "second";
Mysql>create database seconddb;
Mysql>quit;
[/code]
# : /usr/local/mysql/bin/mysqladmin U root flush-privileges
Then with first download and install its own database lists all normal. When again
[code]
# /usr/local/mysql/bin/mysql U root-p
Enter password :
Mysql>use mysql;
Mysql>delete from user where user= "second";
Mysql>grant all on seconddb.* to second@localhost identified by the "second";
[/code]
Then there is wrong :
ERROR 1044 (42000) : Access denied for user 'root' @ 'localhost' to database 'second'
I would like to ask our experts, this is how it all about? Grant all on the indicators shown as *.* to root@localhost identified by the "password"; Not giving root of all authority?
First like to thank!
|
Mysql>delete from user;
This step Who told you? Posterior not even stay? Ha ha
When you take this step, because no flush, the root account is usable grant instructions.
However, the grant was given in addition to all the "grant" all the powers of foreign powers, that is to say, grant to establish the account itself did not grant the authority.
Directly update the database bar, select * from mysql.user where host= 'localhost' and user= 'root', N Grant_priv field is converted to Y, then flush.
Simple, mysql delete the data (perhaps var) Contents of things and then re-bin/mysql_install_db --user=mysql before you start the setup root@localhost this should not be deleted. |
Thank rardge.
Grant all is not grant authority? In addition to a grant option with cars?
I always thought that there is no need to grant all increase with grant option : em15 em15 : : : : : em15 |
| |