Difference between revisions of "MySQL Notes"

From OpenEMR Project Wiki
Line 50: Line 50:
|  
|  
|}   
|}   
mysql -u root -p
*Change Password
mysqladmin -u root -p password yourpassword
*Create Database
mysqladmin -u root -p create database1


<br>
<br>
==MySQL Console Commands==
==MySQL Console Commands==
*Commands can span several lines.  Semicolon marks end of command.  Semicolon at end of line executes command.
*Commands can span several lines.  Semicolon marks end of command.  Semicolon at end of line executes command.

Revision as of 15:36, 29 May 2014

Files

/etc/mysql/my.cnf MySQL Config File
/usr/share/mysql Location of sample config files.

Config File Parameters

bind-address Default is localhost. To access mysql from networked computer, change to IP address.



Configuration

  • xxx
xxx


Testing

  • xxx



Command Line Commands

mysql -u root
mysql -u root -p

  • Change Password
mysqladmin -u root -p password yourpassword
  • Create Database
mysqladmin -u root -p create database1


MySQL Console Commands

  • Commands can span several lines. Semicolon marks end of command. Semicolon at end of line executes command.
  • Set Password for Root
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('yourpassword');
  • Create Database
CREATE DATABASE database1;
  • Exit MySQL
\q