1. mysqld_safe is the recommended way to start a mysqld server.
(sudo mysqld_safe)
2. initially, mysql password is not set. Set mysql password:
mysqladmin -u root password 'mypassword'
3. Create a database: mysqladmin -u root -p create jiansen_db
4. Create a superuser:
mysql --user=root -p mysql
(note mysql is not case sensitive)
mysql>CREATE USER 'jiansen'@'localhost' IDENTIFIED BY 'jiansen_passwd';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'jiansen'@'localhost' WITH GRANT OPTION;
5. Using user jiansen:
mysql --user=jiansen -p
mysql> show databases #comments;
mysql>use jiansen_db;
mysql>create table test_table1 (user_name char(32), passwd char(32));
mysql> show tables;
mysql>describe test_table1;
mysql>insert into test_table1 (user_name, passwd) values ('jiansen', 'jiansen');
mysql>select * from test_table1;
mysql>commit ;
mysql> quit;
6. The history file can be found:
~/.mysql_history
Online computer courses, code, programming tutorial and sidebar information for monitoring Canadian S&P/TSX index. Build friendship and networking. Welcome to visit my blogs often!!! I also have two other sites: YouTube Channel and Google site.
Adsense
Popular Posts
- PHPWind-- A PHP forum script applcaition in China
- How to blend adsense inside your post?
- Formatting my post
- Install PHPMailer 5.2.4 and use smtp gmail
- Datatable export excel wraptext and newline
- phpexcel toggle expand and hide column in EXCEL and summary
- Linux, automatically backup MySQL database daily
- SPSS job interview questions
- Notepad++ - Add C++ compiler
- Install PHP ibm_db2 extension in Linux (redHat)
No comments:
Post a Comment