Monday, March 16, 2015

.::: Installation MySQL on Windows, Create User & Database on MySQL :::.

MySQL is a relational database management system (RDBMS), and ships with no GUI tools to administer MySQL databases or manage data contained within the databases. Users may use the included command line tools,[21][22] or use MySQL "front-ends", desktop software and web applications that create and manage MySQL databases, build database structures, back up data, inspect status, and work with data records.[23][24][25][26] The official set of MySQL front-end tools, MySQL Workbench is actively developed by Oracle, and is freely available for use.[27]

1. Install MySQL













#Path to installation directory. All paths are usually resolved relative to this.
basedir="C:/Program Files/MySQL/MySQL Server 5.6/"

#Path to the database root
datadir="C:/ProgramData/MySQL/MySQL Server 5.6/Data/"


user = mysql
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp


2. Create Database
MYSQL> create database pme;

3. Create User
MYSQL> create user 'infosim' identified by 'stablenet';MYSQL> grant all privileges on pme.* to 'infosim'@'%' identified by 'stablenet' with grant option;MYSQL> FLUSH PRIVILEGES;

4. Login with root
c:\Program Files\MySQL\MySQL Server 5.6\bin>mysql -u root -p
Enter password: ****
Welcome to the MySQL monitor.  Commands end with ; or \g. Your MySQL connection id is 26374
Server version: 5.6.23-log MySQL Community Server (GPL)

Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>


5. login with user another root
c:\Program Files\MySQL\MySQL Server 5.6\bin>mysql -u infosim -p
Enter password: *********
Welcome to the MySQL monitor.  Commands end with ; or \g. Your MySQL connection id is 26376
Server version: 5.6.23-log MySQL Community Server (GPL)

Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| pme                |
| test               |
+--------------------+
3 rows in set (0.00 sec)

mysql>

mysql> connect test;
Connection id:    26379
Current database: test

mysql> show tables;
Empty set (0.00 sec)

mysql>


6. Lost password root/user
c:\Program Files\MySQL\MySQL Server 5.6\bin>mysql -u root -p root
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: N
O)

c:\Program Files\MySQL\MySQL Server 5.6\bin>


go to  how to reset password root & user MySQL

No comments:

Post a Comment

Popular Posts