Results: 1580
Notes
  • Newest first
  • Oldest first
  • Newest first(All)
  • Oldest first(All)
delete folder
Removes unwanted folder
some_folder
sudo rm -r some_folder/
-r
means that it removes the directory with its all child directories
by Valeri Tandilashvili
4 years ago
0
Linux
0
MySQL command line
Activates MySQL console
mysql -u some_user -p
After running the command, we will be required to enter
password
of the mysql user
some_user
After that, MySQL
console
will be activated where we can run MySQL queries
by Valeri Tandilashvili
4 years ago
0
Linux
MySQL
0
create database backup using mysqldump
Creates
backup.sql
backup file of
some_db
database using
some_user
MySQL user. The database is located at
34.mysql.servage.net
server.
mysqldump -h 34.mysql.servage.net -u some_user -p some_db > backup.sql
Creates
backup.sql
backup file of
some_db
database with the same MySQL user but without
-h
flag. If the database is located on the same server (localhost)
-h
flag is not necessary to specify
mysqldump -u some_user -p some_db > backup.sql
If we want to include all the routines (procedures, functions), then we need to use flag
-R
mysqldump -u some_user -p some_db -R > backup.sql
If we want to export only one or several tables, then we should list tables after database name
mysqldump -u root -p sdtokens sdt_prices another_table > sdt_prices.sql
After running the command, we will be required to enter password of the
some_user
mysql user. After that, MySQL will create
backup.sql
file on the same location
by Valeri Tandilashvili
4 years ago
0
Linux
MySQL
Command line
0
apt update
The command gets information from the Internet about updated packages
sudo apt update
by Valeri Tandilashvili
4 years ago
0
Linux
0
apt install
Installs
Git
on the server
sudo apt install git
Installs Nginx server
sudo apt install nginx
Installs MySQL Server
sudo apt install mysql-server
Installs php-fpm and php-mysql
sudo apt install php-fpm php-mysql
Installs additional necessary packages for PHP
sudo apt install php-pdo php-common php-dom php-mbstring php-gd php-json php-soap php-xml php-cli php-ldap php-zip
by Valeri Tandilashvili
4 years ago
0
Linux
MySQL
0
ufw allow 'Nginx HTTP'
Allows HTTP for Nginx server
sudo ufw allow 'Nginx HTTP'
by Valeri Tandilashvili
4 years ago
0
Linux
0
set password for MySQL root user
We run the command after installing
mysql-server
to set password for the
root
user
sudo mysql_secure_installation
After the command is executed, we enter the password for the MySQL root user
by Valeri Tandilashvili
4 years ago
0
Linux
MySQL
0
change password for MySQL root user
Changes password for MySQL
root
user to
some password
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'some password';
by Valeri Tandilashvili
4 years ago
0
Linux
MySQL
0
run queries
We can run queries (that are inside
queries
file) from Linux command line
mysql -u test_user -p test_db < /var/www/queries.sql
The queries inside the file will be run into
test_db
using
test_user
user. Note: The above command can be used to restore database, or add some tables, or insert some rows.
by Valeri Tandilashvili
4 years ago
0
Linux
MySQL
Command line
0
reload nginx
Reloads
nginx
server to apply changes
sudo systemctl reload nginx
by Valeri Tandilashvili
4 years ago
0
Linux
0
Results: 1580