MySQL server

From MEPIS Documentation Wiki

Jump to: navigation, search

MySQL5

1. Installing mysql5 with apt-get:

apt-get install mysql-server

2. Initialize the database:

mysql_install_db 

3. Start sql server by:

mysqld_safe

4. Test it by:

mysqlshow

5. Set up user password:

mysqladmin -u root -h localhost password "somePassword"

Configuration

Configuration for MySQL is in /etc/mysql/my.cnf. Most of the defaults should work fine, but there are some things you might want to change:

  • By default, MySQL is only accessible from the local machine. If you want to access the database directly from other machines on the network, change:
bind-address = 127.0.0.1

To:

bind-address = 0.0.0.0
  • The default network port for MySQL is 3306. Usually you don't want to change this, as applications that work with MySQL look for it at that port. If you do need to change it, under [mysqld] change:
port = 3306

To:

port = ???? # whatever you need it to be...

Links

Personal tools
In other languages