MySQL/Server

From Omnia
Revision as of 05:31, 28 May 2017 by Kenneth (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Installation

sudo yum install mysql-server
sudo /sbin/service mysqld start
# sudo /usr/bin/mysql_secure_installation

Security

mysql -u root
use mysql;
truncate user;
truncate db;
grant all on *.* to root@localhost with grant option;
flush privileges;

If you screw up: [1]

/usr/libexec/mysqld --skip-grant
# in another window:
mysql -u root
use mysql;
truncate user;
truncate db;
describe user;  -- match columens
insert into `user` VALUES('localhost','root',,'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y',,,,,0,0,0,0);
# kill and restart mysql