/=============================================================================================================================================
ANother way
setting up phpMyAdmin on Ubuntu Server 22.04. Let's go step by step to get phpMyAdmin working correctly for you:
Download phpMyAdmin: First, ensure that you have phpMyAdmin installed on your server. You can download it using the following command:
bashsudo apt update sudo apt install phpmyadmin
During the installation, you will be asked to choose a web server. Select apache2 using the arrow keys and press Enter.
Now after this the most important work is to set it on URL for example on server's root URL or IP if you
have already deployed any python or node project and you want to access phpmyadmin outsite of that Document
Root then you have to use Allias
for example your server url is 195.35.23.26 and you want to access it on
then you have to make changes in your default conf file like below
<VirtualHost *:80>
ServerName 195.35.23.26
DocumentRoot /root/homemapp
# Rewrite rules for phpMyAdmin
RewriteEngine On
RewriteRule ^/phpmyadmin(/.*)?$ /usr/share/phpmyadmin$1 [L,QSA]
# ProxyPass for Python project
ProxyPass / http://127.0.0.1:8000/
ProxyPassReverse / http://127.0.0.1:8000/
<Directory /root/homemapp>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
<Directory /usr/share/phpmyadmin>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
After this please Restart your Apache server
sudo systemctl restart apache2
//=========================== ANother Ways =================
//============= node on ubuntu 22.01 server
sudo apt update
sudo apt install curl
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install nodejs
node -v
sudo systemctl stop nginx
sudo apt update
sudo apt install apache2
//=========== Apache
sudo apt update
sudo apt update
sudo apt install apache2
sudo systemctl start apache2
sudo systemctl enable apache2
sudo systemctl status apache2
//======== mysql
sudo apt install mysql-server
ls /etc/mysql
sudo mkdir -p /etc/mysql
sudo nano /etc/mysql/my.cnf
put the following code in my.cnf
[mysqld]
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
datadir = /var/lib/mysql
log-error = /var/log/mysql/error.log
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
sudo mkdir -p /var/lib/mysql
sudo mkdir -p /var/run/mysqld
sudo chown -R mysql:mysql /var/lib/mysql
sudo chown -R mysql:mysql /var/run/mysqld
sudo chmod 755 /var/lib/mysql
sudo chmod 755 /var/run/mysqld
sudo systemctl start mysql
// For making root with no password on terminal ->
USE mysql;
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '';
FLUSH PRIVILEGES;
EXIT;
-------------- DOne mySQL installation on Ubuntu22 server
//========== isntall PHP properly before phpmyadmin
//==================== PHPmyadmin
Now its time to Install Phpmyadmin to use mysql on ubuntu
sudo apt update
sudo apt install phpmyadmin
sudo mysql
CREATE USER 'kilvish'@'localhost' IDENTIFIED BY 'Kil@123456';
GRANT ALL PRIVILEGES ON *.* TO 'kilvish'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;
//after exit mysql
sudo nano /etc/apache2/conf-enabled/phpmyadmin.conf
Alias /phpmyadmin /usr/share/phpmyadmin
<Directory /usr/share/phpmyadmin>
Options FollowSymLinks
DirectoryIndex index.php
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
Require all granted
</RequireAny>
</IfModule>
</Directory>
sudo systemctl restart apache2
//------------ Now install php
- Get link
- X
- Other Apps
- Get link
- X
- Other Apps
Comments
Post a Comment