Re: MySQL

Ignatiy Goloviznin <[email protected]> Sun, 06 Feb 2005 03:12:10 +0200
Newsgroups gmane.linux.mandrake.expert.russian
Message-ID <[email protected]>
Roman Shiryaev =D0=C9=DB=C5=D4:
> $ urpmf my.*cnf
> MySQL-common:/usr/share/mysql/my-huge.cnf
> MySQL-common:/usr/share/mysql/my-large.cnf
> MySQL-common:/usr/share/mysql/my-medium.cnf
> MySQL-common:/usr/share/mysql/my-small.cnf

=E1 =CB=C1=CB=CF=CA =C9=DA =CE=C9=C8 =CB=CF=D0=C9=D2=CF=D7=C1=D4=D8 =D3 =C9=
=CD=C5=CE=C5=CD my.cnf =D7 etc?

[root@localhost ignat]# mysql_setpermission -help
----------------------------------------------------------------------
                  The permission setter for MySQL.
                       version: 1.3

                  made by: Luuk de Boer <[email protected]>
----------------------------------------------------------------------

The permission setter is a little program which can help you add users
or databases or change passwords in MySQL. Keep in mind that we don't
check permissions which already been set in MySQL. So if you can't
connect to MySQL using the permission you just added, take a look at
the permissions which have already been set in MySQL.

The permission setter first reads your .my.cnf file in your Home
directory if it exists.

Options for the permission setter:

--help          : print this help message and exit.

The options shown below are used for making the connection to the MySQL
server. Keep in mind that the permissions for the user specified via
these options must be sufficient to add users / create databases / set
passwords.

--user          : is the username to connect with.
--password      : the password of the username.
--host          : the host to connect to.
--socket        : the socket to connect to.
--port          : the port number of the host to connect to.

If you don't give a password and no password is set in your .my.cnf
file, then the permission setter will ask for a password.

[root@localhost ignat]# mysql_setpermission --user root --password=20
--host root@localhost
Can't make a connection to the mysql server.
  The error: Access denied for user: 'root@localhost' (Using password:=20
YES) at /usr/bin/mysql_setpermission line 70.

>>=F7=C5=C4=D8 =CF=CE =CE=D5=D6=C5=CE =C4=CC=D1 =D3=CF=DA=C4=C1=CE=C9=D1 =
=CE=CF=D7=D9=C8 =D0=CF=CC=D8=DA=CF=D7=C1=D4=C5=CC=C5=CA, =C2=C1=DA=D9 =C9=
=20
>>hostname.
>>=E9 =D3=D2=C1=DA=D5 =C5=DD=A3 =D7=CF=D0=D2=CF=D3=C9=CB, =CB=C1=CB =DA=C1=
=C4=C1=D4=D8 Database server hostname,
>>=D0=CF=CC=D8=DA=CF=D7=C1=D4=C5=CC=D1 =C9 =C5=C7=CF =D0=C1=D2=CF=CC=D8?
> =D5=DE=C9 SQL -- =C9=CE=C1=DE=C5 =CE=C9=CB=C1=CB. =E9=CC=C9 =D4=C5=C2=C5=
 =C7=CF=D4=CF=D7=D9=C5 =DA=C1=D0=D2=CF=D3=D9 =CE=D5=D6=CE=D9?

=F5=DE=C9=D4=D8 =C7=C4=C5? =F0=D2=C9 =D3=CF=DA=C4=C1=CE=C9=C9 =C2=C1=DA=D9=
 =D7=D9=C4=C1=A3=D4=D3=D1 =CF=DB=C9=C2=CB=C1:

[ignat@localhost ignat]$ mysqladmin create ign
mysqladmin: CREATE DATABASE failed; error: 'Access denied for user:=20
'@localhost' to database 'ign''

[root@localhost ignat]# mysqladmin create ign
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost' (Using password: NO)'

=E8=CF=D4=D1 =D0=C5=D2=C5=C4 =DC=D4=C9=CD =D5=D3=D0=C5=DB=CE=CF =D5=C4=C1=
=CC=C9=CC =C2=C1=DA=D5 =CB=CF=CD=C1=CE=C4=CF=CA:

[ignat@localhost ignat]$ mysqladmin drop test

=EB=C1=CB =D3=CF=DA=C4=C1=D4=D8 =D0=CF=CC=D8=DA=CF=D7=C1=D4=C5=CC=D1 =C9 =
=D0=D2=CF=D0=C9=D3=C1=D4=D8 =C5=CD=D5 =D0=C1=D2=CF=CC=D8 =D1 =CE=C5 =CE=C1=
=DB=A3=CC, =CB=C1=CB=20
=D0=D2=CF=D3=CD=CF=D4=D2=C5=D4=D8 =D0=CF=CC=D8=DA=CF=D7=C1=D4=C5=CC=C5=CA=
 =C2=C1=DA=D9 =D1 =D4=CF=D6=C5 =CE=C5 =CE=C1=DB=A3=CC. =EB=C1=CB =C9=DA=CD=
=C5=CE=C9=D4=D8 =D0=C1=D2=CF=CC=D8 =D1=20
=D4=CF=D6=C5 =CE=C5 =CE=C1=DB=A3=CC. =F0=CF=C4=D3=CB=C1=D6=C9=D4=C5 =C8=CF=
=D4=D1 =C2=D9 =DC=D4=C9 =D0=D2=CF=D3=D4=D9=C5 =CB=CF=CD=C1=CE=C4=D9, =C1 =
=D4=CF =D1 =C2=D5=C4=D5=20
=C2=C9=D4=D8=D3=D1 =CE=C5=D3=CB=CF=CC=D8=CB=CF =C4=CE=C5=CA =D7 =CE=C5=D0=
=CF=CE=D1=D4=CB=C5, =DC=D4=CF =D1 =CE=C5 =D0=D2=C1=D7=C9=CC=D8=CE=CF =CB=CF=
=CD=C1=CE=C4=D9 =C4=C1=C0 =C9=CC=C9=20
MySQL =D7 MDK =C7=CC=C0=DE=C9=D4.

=F0=CF=DE=C5=CD=D5 connect =CE=C1 'localhost' =CE=C5 =D0=D2=CF=C8=CF=C4=C9=
=D4? =E8=CF=D4=D1

[ignat@localhost ignat]$ mysqlshow
+-----------+
| Databases |
+-----------+
+-----------+
[ignat@localhost ignat]$

=E1

[root@localhost ignat]# mysqlshow
mysqlshow: Access denied for user: 'root@localhost' (Using password: NO)
[root@localhost ignat]#