$ sudo apt update
$ sudo apt install openssh-server
$ sudo systemctl start ssh
$ sudo systemctl status ssh
$ sudo systemctl enable ssh
$ sudo systemctl restart ssh
$ sudo ufw enable
$ sudo ufw allow 22/tcp
$ sudo apt update
$ sudo apt install openssh-server
$ sudo systemctl start ssh
$ sudo systemctl status ssh
$ sudo systemctl enable ssh
$ sudo systemctl restart ssh
$ sudo ufw enable
$ sudo ufw allow 22/tcp
root# nano /etc/mysql/my.cnf
# The MySQL database server configuration file.
#
# You can copy this to one of:
# – “/etc/mysql/my.cnf” to set global options,
# – “~/.my.cnf” to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with –help to get a list of available options and with
# –print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
#
# * IMPORTANT: Additional settings that can override those from this file!
# The files must end with ‘.cnf’, otherwise they’ll be ignored.
#
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/
[mysqld]
# … other stuff will probably be here
sql_mode = “STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION”
group_concat_max_len=2000000
——————————————
root#/etc/init.d/mysql restart
OK work
MySQL is an open-source database management system, commonly installed as part of the popular LAMP (Linux, Apache, MySQL, PHP/Python/Perl) stack. It implements the relational model and uses Structured Query Language (better known as SQL) to manage its data.
This tutorial will go over how to install MySQL version 8.0 on an Ubuntu 20.04 server. By completing it, you will have a working relational database that you can use to build your next website or application.
To follow this tutorial, you will need:
download phpmyadmin https://www.phpmyadmin.net/downloads/
save file config.inc.php in phpmyadmin folder
code :
<?php
/**
* Generated configuration file
* Generated by: phpMyAdmin 5.2.0 setup script
* Date: Tue, 10 Jan 2023 07:41:49 +0000
*/
/* Servers configuration */
$i = 0;
/* Server: 127.0.0.1 [1] */
$i++;
$cfg[‘Servers’][$i][‘verbose’] = ”;
$cfg[‘Servers’][$i][‘host’] = ‘127.0.0.1’;
$cfg[‘Servers’][$i][‘port’] = ”;
$cfg[‘Servers’][$i][‘socket’] = ”;
$cfg[‘Servers’][$i][‘auth_type’] = ‘cookie’;
$cfg[‘Servers’][$i][‘user’] = ‘user’;
$cfg[‘Servers’][$i][‘password’] = ‘12345678’;
/* End of servers configuration */
$cfg[‘blowfish_secret’] = ‘VZP.$U_vB#G\\;>q-r]qY=9<&6(\\GB1S1’;
$cfg[‘DefaultLang’] = ‘en’;
$cfg[‘ServerDefault’] = 1;
$cfg[‘UploadDir’] = ”;
$cfg[‘SaveDir’] = ”;
$ sudo apt-get remove bind9
If you would like to remove bind9 and it’s dependent packages which are no longer needed from Ubuntu,
$ sudo apt-get remove --auto-remove bind9
If you use with purge options to bind9 package all the configuration and dependent packages will be removed.
$ sudo apt-get purge bind9
If you use purge options along with auto remove, will be removed everything regarding the package, It’s really useful when you want to reinstall again.
$ sudo apt-get purge --auto-remove bind9
gz
FileOn Linux and macOS, you can decompress a .gz
file using the gzip
utility. The syntax is as follows:
gzip -d file.gz
The command will restore the compressed file to its original state and remove the .gz
file.
To keep the compressed file pass the -k
option to the command:
gzip -dk file.gz
ตัวอย่าง PHP จํากัดตัวอักษรในการแสดงผล ด้วย mb_strimwidth
<?php
$string = "PHP จํากัดตัวอักษรในการแสดงผล ด้วย mb_strimwidth";
echo mb_strimwidth( $string, 0, 20, "..." );
?>
ผลลัพธ์
PHP จํากัดตัวอักษ...
How do I uninstall or remove Webmin software under Linux / UNIX operating system?
If you have installed it via rpm, type the following command to remove the same:
# rpm -ev webmin
Just run the command /etc/webmin/uninstall.sh if you’ve install it from source:
# /etc/webmin/uninstall.sh
Sample Output: Continue reading