Mysql commands

From RAJ INFO
Revision as of 03:09, 9 August 2021 by Raj (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
  • GetInto from Shell
$ mysql -u $usr -p -h $host $db


  • GetDump
$ mysqldump -u $usr -p -h $host $db >$outfile 
  • RestoreDump
$ mysql -u $usr -p -h $host $db <$outfile


* Create a soft Link
ln -s /home/copperhills/copperhills /var/www/copperhills


First Time

> apt install mysql-server
> mysql_secure_installation
> CREATE USER 'USER'@'localhost' identified by 'PWD';
>  GRANT ALL PRIVILEGES ON  *.* TO 'USER'@'localhsot';

Mediawiki File permissions

sudo find . -type f -exec chmod 644 {} \;
sudo find . -type d -exec chmod 755 {} \;