How to create a new MySQL database in Debian/Ubuntu


This is a short memo on how to install and work on MySQL databases under a Debian Linux compatible OS.


Install MySQL server

sudo apt-get install mysql-server

Create a new MySQL database

mysqladmin -u root create <databasename>

Working on MySQL databases

mysql -u root <databasename> < sqlcommands.sql

Where mysqlcommands.sql is a file that contains sql queries for modifying the database.


Other

If you are running PHP you will also need to install the php module for mysql :

sudo apt-get install php5-mysql


Labels: , Wireless Internet Security Coding Network Monitoring

Comment

Enter your comment (wiki syntax is allowed):
VKVHB

Wireless Internet Security Performance RADIUS server Wireless Internet Security Performance RADIUS server