Monday, April 16, 2018

Ubuntu & MySQL

Ubuntu & MySQL

# apt-get update
(download/refreshes package informations from configured sources)

Configured sources
$ cat /etc/apt/sources.list

# apt-get install mysql-server
# /usr/bin/mysql_secure_installation
>to create root user & password

# service mysql start
# /usr/sbin/update-rc.d mysql defaults
>to set autostart after every reboot

>Note: network access port = 3306

# mysql -u root -p
mysql>

> show databases
> grant all privileges on *.* to 'mzadmin'@'localhost';
> create database dbphone;
> use dbphone;
> show tables;
> create table tphone (id int, name varchar(25), phone varchar(10));
> insert into tphone values (1,'Rosli','0123335555');
> select * from tphone;
> describe tphone;
> quit;

UBUNTU INSTALL PACKAGE
Install/upgrade oracle java in Ubuntu

$ sudo apt-get update
$ sudo apt-cache search jre
$ sudo apt-get install default-jre

$ java -version

0 Comments:

Post a Comment

<< Home