Results: 1022
tinyint data type
In Laravel 8+
tinyInteger
method generates
tinyint(4)
data type in MySQL
$table->tinyInteger('column_name');
Whereas
boolean
method generates
tinyint(1)
data type
$table->$table->boolean('column_name');
edit file
Opens
.env
file with edit mode using command line interface
sudo nano .env
We can specify the file with full address
sudo nano /var/www/csmp.ge/.env
delete file
Deletes specified file
sudo unlink /etc/nginx/sites-enabled/csmp.use.ge
copy file
Duplicates
.env.example
file, names it
.env
and places it in the same directory
sudo cp .env.example .env
clone remote repository
After installing
Git
on the server, we can clone remote repository
sudo git clone https://tandilashvili@bitbucket.org/tandilashvili/csmp.git
The command clones the remote repository of
csmp
project
reload nginx
Reloads
nginx
server to apply changes
sudo systemctl reload nginx
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.
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';
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
ufw allow 'Nginx HTTP'
Allows HTTP for Nginx server
sudo ufw allow 'Nginx HTTP'
Results: 1022