Mysql commands: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
| (7 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
* GetInto from Shell | |||
<pre> | |||
$ mysql -u $usr -p -h $host $db | |||
</pre> | |||
* GetDump | * GetDump | ||
< | <pre> | ||
$ mysqldump -u $usr -p -h $host $db >$outfile | $ mysqldump -u $usr -p -h $host $db >$outfile | ||
</ | </pre> | ||
* RestoreDump | * RestoreDump | ||
< | <pre> | ||
$ mysql -u $usr -p -h $host $db <$outfile | $ mysql -u $usr -p -h $host $db <$outfile | ||
</mysql> | |||
* Create a soft Link | |||
ln -s /home/copperhills/copperhills /var/www/copperhills | |||
</pre> | |||
== First Time == | |||
<source> | |||
> apt install mysql-server | |||
> mysql_secure_installation | |||
> CREATE USER 'USER'@'localhost' identified by 'PWD'; | |||
> GRANT ALL PRIVILEGES ON *.* TO 'USER'@'localhsot'; | |||
</source> | |||
==Mediawiki File permissions == | |||
<pre> | |||
sudo find . -type f -exec chmod 644 {} \; | |||
sudo find . -type d -exec chmod 755 {} \; | |||
</pre> | |||
[[Category:Bioinformatics]] | |||
Latest revision as of 03:09, 9 August 2021
- 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 {} \;