Mozilla Skin

Mysql

From YourSupportStoreWiki

First to log in you type

if you are on the server

mysql -u username -ppassword

or if you know the database

mysql -u username -ppassword -D databasename

if you are not on the server

mysql -h hostname -u username -ppassword

or if you know the database

mysql -h hostename -u username -ppassword -D databasename

now to create a user

create user username IDENTIFIED BY 'password';

and to give that user all access to the databases

grant all privileges on *.* to 'username'@'%' identified by 'password'

then you can use the menus to run queries.

A simple search

select * from table where column = 'value';

to make changes

update table set column = 'value' where anothercolumn = 'value';

to make deletes

delete from table where column = 'value';


now to export your data to a file

select * from table where column = 'value' into OUTFILE 'filename.txt';