Catégorie : MySQL

  • Commandes MySQL

    Voir : http://www.pantz.org/software/mysql/mysqlcommands.html Voir aussi : http://www.wbluhm.com/MySQLTut.html To login (from unix shell) use -h only if needed. # [mysql dir]/bin/mysql -h hostname -u root -p Create a database on the sql server. mysql> create database [databasename]; List all databases on the sql server. mysql> show databases; Switch to a database. mysql> use [db name]; To…

  • Exécuter un script .sql

    mysql <my_db_name> -u<user_name> -p<password> < mysql.sql

  • Fichier mysql-slow.log

    Dans : /etc/my.cnf log-slow-queries = /var/log/mysql-slow.log long_query_time = 5 log-long-format #log-queries-not-using-indexes log-warnings=2 Dans : /var/log/ touch mysql-slow.log chmod 660 mysql-slow.log chown mysql:mysql mysql-slow.log service mysql restart

  • Connaître version de mysql

    Taper : mysqladmin version

  • Réparation de tables

    http://mirrors.dotsrc.org/mysql/doc/refman/5.1/en/rebuilding-tables.html How To Repair Corrupted MySQL Tables Using myisamchk