mysql server connection setup with phpmyadmin - mysql

I installed mysql-server on Debian. And also installed lampp on Debian. But in order to run lampp and properly working of phpmyadmin I have to stop my mysql-server running on Debian. This creates two different mysql servers. One belonging to phpmyadmin and one belonging to mysql running locally. Is there any way, so that both phpmyadmin and mysql-server run on same port?

You cant run both mysql servers on same port. The best way is to remove Both MySql and Lamp stack then reinstalling it again.
1.)remove mysql and lamp stack:-
sudo apt-get remove --purge mysql-server.* apache2* php* phpmyadmin*
sudo apt-get auto-remove
2.)install lamp stack
sudo apt-get update
sudo apt-get install
sudo apt-get install apache2
sudo apt-get install mysql-server
sudo apt-get install php5 php-pear php5-mysql
sudo service apache2 restart
sudo apt-get install phpmyadmin
then you are ready to code!

Related

Why is mysql asking for password after default installation as root

I see this when I ssh to my Ubuntu server:
Welcome to Ubuntu 20.04.4 LTS (GNU/Linux 5.4.0-1018-aws x86_64)
After installing mysql, I try to login to the mysql server but for some reason it asks me for a password that I do not have. So, I ran the following commands to uninstall mysql and reinstall.
Uninstall
sudo apt-get remove --purge mysql*
sudo apt-get purge mysql*
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get remove dbconfig-mysql
sudo apt-get dist-upgrade
The I used this link as guide to install mysql, and the commands went as follows:
sudo apt update
sudo apt install mysql-server
sudo systemctl start mysql.service
When I run:
sudo mysql_secure_installation
The prompt asks me to “Enter password for the user root”. Where do I find this password?
The idea of the command is to set the password.
How can I install mysql in this server to then be able to manage my databases?

How to install MySQL 5.6 in Ubuntu 18.04(VM)

I'm using packer to install MySQL 5.6 on an Ubuntu VM. To install it, I'm using the below script.
#!/bin/bash
sudo add-apt-repository 'deb http://kr.archive.ubuntu.com/ubuntu xenial main' -y
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu trusty universe' -y
sudo apt-get update -y
sudo apt-get install mysql-server-5.6 -y
systemctl restart mysql
However, the installer kept prompting for a password. Is there any way to pass the password in the script since it's installed within a VM? I'm stuck in this situation.
error-screenshot

Cant install MySQL Becouse no Root Permissions?

Hello I want to Install MySQL to my Vserver, I created a New user, but I cant Install MySQL becouse I have no root permissions for the user
What can I do now?
Linux - Debian 9
apt-get install apache2 php libapache2-mod-php
apt-get install mysql-server mysql-client php-mysql
apt-get install phpmyadmin
/etc/init.d/apache2 restart
echo Include /etc/phpmyadmin/apache.conf /etc/apache2/apache2.conf
/etc/init.d/apache2 restart
Just substitute with sudo:
sudo su
apt-get install apache2 php libapache2-mod-php
apt-get install mysql-server mysql-client php-mysql
apt-get install phpmyadmin
/etc/init.d/apache2 restart
echo Include /etc/phpmyadmin/apache.conf /etc/apache2/apache2.conf
/etc/init.d/apache2 restart

Facing issue while installing PHPMYADMIN

I am trying to install PHPMyAdmin on my Ubuntu 16 setup.
I am using this document to do so:
https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-on-ubuntu-16-04
But I am getting following error while installation:
I even try to uninstall mysql completely for which I used following steps, but it did not work.
Removing MySQL 5.5 Completely
First of all You have to remove whole phpmyadmin from your system using
sudo apt-get remove phpmyadmin mysql-server mysql-client
sudo apt-get purge phpmyadmin mysql-server
sudo apt-get autoremove
sudo apt-get update
sudo apt-get install phpmyadmin
sudo apt-get install mysql-client mysql-server

uninstall MySQL only from LAMP install Ubuntu 15.5

I believe there is an error with my MySQL install -- which was auto installed while installing Ubuntu 15.5/LAMP. I would like to only uninstall MySQL and try again, however the usual
"sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean"
does not remove it and shows instead an option to remove the entire lamp image. How can I remove/reinstall MySQL only?