Next part of subset of MySQL commands (for UNIX/Linux admins)
1. Display list of databases
SHOW DATABASES;
2. Display list of tables in current database
SHOW TABLES;
3. Display list of tables in noncurrent database
SHOW TABLES FROM database_name;
Showing posts with label mysql. Show all posts
Showing posts with label mysql. Show all posts
Fast guide to MySQL
This is just very little subset of command to help beginners with MySQL. Do not expect something extraordinary :)
All the command must be executed from mysql command prompt which you can reach with command:
mysql -u username -p password
1. Create database
CREATE DATABASE mybase;
2. Switch to use database
USE mybase;
3. Create user
CREATE USER myuser IDENTIFIED BY 'password';
4. Assign all right of user to database
GRANT ALL PRIVILEGES ON mybase.* TO 'myuser';
5. Flush privileges (to make them work at the moment)
FLUSH PRIVILEGES;
Be aware command are all caps, with small caps are parameters
All the command must be executed from mysql command prompt which you can reach with command:
mysql -u username -p password
1. Create database
CREATE DATABASE mybase;
2. Switch to use database
USE mybase;
3. Create user
CREATE USER myuser IDENTIFIED BY 'password';
4. Assign all right of user to database
GRANT ALL PRIVILEGES ON mybase.* TO 'myuser';
5. Flush privileges (to make them work at the moment)
FLUSH PRIVILEGES;
Be aware command are all caps, with small caps are parameters
Subscribe to:
Posts (Atom)
Should I trust AI
Should I trust AI? So far no, sorry. I tested for the moment (May, 2025) most advanced model for programming and ask very simple question:...
-
Grow soft partition on the fly 1. Create random file and calculate checksum # cd /oradata # dd if=/dev/urandom of=file bs=1024 count=10...
-
To build firewall under AIX is sample, but as each host based firewall should be done careful 1. Prerequisites To start firewall in AIX yo...
-
There are some cases when you want to create compressed tar archive but you do not have enough disk space to keep original files and tar arc...