What Success And Failure Taught Me About Starting A Company | LinkedIn:
'via Blog this'
Friday, January 31, 2014
Wednesday, January 22, 2014
Tuesday, January 21, 2014
Sunday, January 12, 2014
Saturday, January 11, 2014
Tuesday, January 7, 2014
Sunday, January 5, 2014
Saturday, January 4, 2014
Installing MySQL on Ubuntu
- Update the OS
- sudo apt-get update
- Install MySQL
- sudo apt-get install mysql-server (You will be prompted for root password. Dont forget the password)
- It is not advisable to open mysql connections to outside of localhost. However if you must, then
- sudo vi /etc/mysql/my.cnf
- Comment out the line "bind-address 127.0.0.1"
- After install, create a non-root user ID
- mysql -u root -h 127.0.0.1 -p (when prompted enter the root password)
- create user 'userid'@'localhost' identified by 'passwd'
- grant all privileges on *.* to 'userid'@'%' identified by 'passwd' with grant option;
- flush privileges;
- quit
- Restart MySQL
- sudo /etc/init.d/mysql restart
- Create tables, Insert data, Select data
- mysql -u <userid> -h <host name> -p
- create database <db name>;
- use <db name>;
- create table test1 (fname varchar(20));
- insert into test1 values('John');
- select * from test1;
- Install a SQL GUI client (Toad or RapidSQL or SequelPro(for mac), etc)
- For bulk import of a CSV file (reference)
- mysqlimport --ignore-lines=1 --fields-terminated-by=, --columns='ID,Name,Phone,Address' --local -u root -p Database /path/to/csvfile/TableName.csv
- Happy SQLing!
Subscribe to:
Posts (Atom)