Création d’une base mysql en ligne de commande

Pour créé une base Mysql et pouvoir l’utiliser, c’est relativement simple, on va utiliser l’outil mysql de base pour : créé une base et donner les droits d’utilisation à un utilisateur.

root@serveur:~# mysql -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 41
Server version: 5.1.63-0+squeeze1 (Debian)

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create database testjoomla; Query OK, 1 row affected (0.00 sec)
mysql> grant all on testjoomla.* to 'testjoomla'@'localhost' identified by 'password'; Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges; Query OK, 0 rows affected (0.00 sec)

Comments are closed.