690 shaares
3 liens privés
3 liens privés
Directories & start
Fichier de configuration
https://mariadb.com/kb/en/mariadb/configuring-mariadb-with-mycnf/
Répertoires
cat /etc/mysql/mariadb.conf.d/50-server.cnf | egrep "datadir|socket.*=|log_file|log_error|log_bin"
database
mysql> show databases;
mysql> create database [databasename];
mysql> use [db name];
mysqladmin
mysqladmin -u <username> -h <hostname.blah.org> -p<password> 'new-password'>
mysqladmin -u root -p<password> ping
mysqladmin -u root -p<password> status
mysqladmin -u root -p<password> extended-status
mysqladmin -u root -p<password> variables
mysqladmin -u root -p<password> create <testdb>
mysqladmin -u root -p<password> reload; # reload grant tables
mysqladmin -u root -p<password> shutdown
create user
mysql -u root -p
mysql> use mysql;
mysql> SELECT * FROM user;
mysql> CREATE USER 'username'@'%' IDENTIFIED BY 'password';
mysql> GRANT ALL PRIVILEGES ON testdb.* TO 'username'@'%' WITH GRANT OPTION;
mysql> GRANT ALL PRIVILEGES ON testdb.* TO 'username'@'%'
mysql> GRANT ALL PRIVILEGES ON *.* TO 'username'@'%'
mysql> flush privileges;
Innodb ou myisam
mysql> SELECT ENGINE FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='your_table_name' AND TABLE_SCHEMA='your_database_name';
cat /etc/my.cnf | grep default-storage-engine