Apache dan MySQL
Jump to navigation
Jump to search
The Apache HTTP Server, colloquially called Apache, is a free and open-source cross-platform web server software, released under the terms of Apache License 2.0. Apache is developed and maintained by an open community of developers under the auspices of the Apache Software Foundation. MySQL is an open-source relational database management system. Its name is a combination of "My", the name of co-founder Michael Widenius's daughter, and "SQL", the abbreviation for Structured Query Language. A relational database organizes data into one or more data tables in which data types may be related to each other; these relations help structure the data.
Contents
Instalasi
Apache2
sudo apt install apache2
PHP
sudo apt install php php-curl php-xml libapache2-mod-php php-mysql php-mbstring php-gettext php-fpm
=MySQL
sudo apt install mysql-server mysql-client sudo mysql_secure_installation
Setting Awal
sudo mysql -u root -p
SELECT user, authentication_string, plugin, host FROM mysql.user; ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '<isikan password>'; FLUSH PRIVILEGES;
Jika folder tidak ada:
mkdir -p /var/run/mysqld chown mysql:mysql /var/run/mysqld
Jika lupa password
/etc/init.d/mysql stop mysqld_safe --skip-grant-tables &
Buka terminal lain, lalu ketik
mysql -u root
Kosongkan password
UPDATE user set authentication_string= where user='root'; FLUSH PRIVILEGES;
Isi
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '<isikan password baru>';