Monday, April 2, 2012

Linux MySQL kroz terminal?

Kreiranje i upload MySQL baze podataka:

mysql -u root -p -e ‘create database mydatabase’
mysql -u sales -p mydatabase < mydatabase.sql


Brisanje MySQL baze podataka:

show databases;
rop database mydatabase;

Eksportovanje baze podataka:

mysqldump -u {database_username} -p {database_name} > mysqlbackup.sql

No comments:

Post a Comment