Home

Search this site:
 

Horshack’s
very
own site

 

This is Bavaria, Germany!
You will find links to Perl,
bootdisks for system administration,
a lot of Linux,
Windows administration
and some personal belongings.
Mysql wth Vserver

Mysql with Debian

Install

home:/# apt-get install mysql-server

Let the database server listen to network. Edit /etc/mysql/my.cnf:

  1. Remove the line skip-networking so that mysql also does network-connect
  2. Give more keybuffer:
    set-variable = key_buffer=128M
  3. Bind only this one ip-address:

    [mysqld]
    user            = mysql
    ...
    bind-address    = 10.1.1.4
    port            = 3306
     
  4. /etc/init.d/mysql restart

Bind Mysqld to special ip-address

Put this into your file /etc/my.cnf:

Change password for user root

You need this if you want to have a special password for user root to make exports or so

# mysql -uroot
use mysql;
update user set password=PASSWORD("newpassword_for_root") where User='root';
flush privileges;

Add users

mysql3:/etc# mysql -uroot
mysql> set password for 'root' = password('yyy');
Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON *.* TO 'wwwrun' IDENTIFIED BY 'xxx';
Query OK, 0 rows affected (0.00 sec)

mysql> delete from user where host='localhost' and user='';
Query OK, 1 row affected (0.00 sec)

mysql> delete from user where host='mysql3' and user='';
Query OK, 1 row affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> quit;
Check the accounts from commandline - from outside network:
mysql3:/etc# mysql -uwwwrun -pxxx -hmysql3.rosi13.de
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5 to server version: 3.23.49-log

mysql3:/etc# mysql -uroot -pyyy -hmysql3.rosi13.de
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5 to server version: 3.23.49-log
Check the accounts from commandline - from inside:
mysql3:/etc# mysql -uwwwrun -pxxx
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5 to server version: 3.23.49-log

mysql3:/etc# mysql -uroot -pyyy
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5 to server version: 3.23.49-log
Impressum