January 28, 2010

FreeBSD - Установка и настройка mysql 6

Установка и конфигурирование

freebsd# cd /usr/ports/databases/mysql60-server/
freebsd# make && make install && make clean
freebsd# cp /usr/local/share/mysql/my-huge.cnf /etc/my.cnf
freebsd# echo 'mysql_enable="YES"' >> /etc/rc.conf
freebsd# /usr/local/etc/rc.d/mysql-server start

Удаление ненужных пользователей из mysql и задание пароля для root

freebsd# mysql --database=mysql --execute="SELECT COUNT(*) FROM user"
+----------+
| COUNT(*) |
+----------+
| 5 |
+----------+
freebsd# mysql --database=mysql --execute="DELETE FROM user WHERE User=''"
freebsd# mysql --database=mysql --execute="SELECT COUNT(*) FROM user"
+----------+
| COUNT(*) |
+----------+
| 3 |
+----------+
freebsd# mysql --database=mysql --execute="DELETE FROM user WHERE Host != 'localhost'"
freebsd# mysql --database=mysql --execute="SELECT COUNT(*) FROM user"
+----------+
| COUNT(*) |
+----------+
| 1 |
+----------+
freebsd# mysql --database=mysql --execute="UPDATE user SET Password = PASSWORD('Пароль')"
freebsd# mysql --database=mysql --execute="FLUSH privileges"

freebsd# mysql -p
Enter password: Пароль

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 24
Server version: 6.0.11-alpha-log FreeBSD port: mysql-server-6.0.11

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

2 comments:

  1. это курент? ато версию муси 60 в портах я не нашёл

    ReplyDelete
  2. Current 5.5.8

    Я как понимаю 6 был тестовый и сейчас уже Has expired: no longer under development.


    freebsd# make search name="mysql"

    Port: databases/mysql60-server
    Moved:
    Date: 2010-01-10
    Reason: Has expired: no longer under development

    ReplyDelete