Yalo
    e-mail
    internet accelerators
    internet access
    internet and phone call
    web hosting
    storage space
    url redirection
    internet call waiting
    free sms
    nota bene
 
 

A short selection of MySQL commands

Set password for user root on this host to be pass_word

mysqladmin -u root password 'pass_word'

Set password for user root on host relay.domain_name.net to be pass_word

mysqladmin -u root -h relay.domain_name.net password 'pass_word'

Set password for user root on host with IP 192.168.192.168 to be pass_word

mysqladmin -u root -h 192.168.192.168 password 'pass_word'

Set password for current user to be pass and encrypt it.

set password = password('pass')

Set password for user user_name to be pass_word and encrypt it

set password for user_name = password('pass_word')

Set password for user user_name accessing this server from host host_name to be pass_word and encrypt it.

set password for user_name@host_name = password('pass_word')

Give privileges to use all databases to user user_name from host host_name with password pass_word

grant usage on *.* to 'user_name'@'host_name' identified by 'pass_word'

Give all privileges to user user_name on database database_name accessing it from localhost

grant all privileges on database_name.* to user_name@localhost

Give all privileges on database database_name to user user_name which has password pass_word

grant all privileges on database_name.* to user_name identified by 'pass_word'

Revoke all privileges on database database from user username which has password pass

revoke all privileges on database.* from 'username'@'localhost' identified by 'pass';

Show privileges for user user_name accessing this server from host relay.domain_name.net

show grants for 'user_name'@'relay.domain_name.net'

Show a list of all databases names

show databases

Select database named database_name to use

use database_name

Show a list of tables names in current database

show tables

Show a list of MySQL server variables and their values

show variables

Describe table named table_name

describe table_name

Enable logging at runtime

set GLOBAL general_log='ON'

Disable logging at runtime

set GLOBAL general_log='OFF'

Create a database named database_name

create database database_name

Delete database named database_name from MySQL server and from the hard disk

drop database database_name