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
- PHP: add a download as pdf file button in report page
- How to blend adsense inside your post?
- Formatting my post
- PHPWind-- A PHP forum script applcaition in China
- Notepad++ - Add C++ compiler
- PHP connect IBM db2 database in XAMPP
- Datatable export excel wraptext and newline
- phpexcel toggle expand and hide column in EXCEL and summary
- Sweet Alert JS library - beautiful replacement of JavaScript Alert
- ActionScript 3.0 demo: create a falling snow in flash CS6
No comments:
Post a Comment