Configuring mysql stuffs on VPS -
biker122 - 13.03.2015
Hi, I'm having a VPS with CentOS 6 x86_64 (Probably 64 bit.)
I'm done uploading stuffs to the VPS server, but I can't find a way to install and use mysql/phpmyadmin..
Things what I've done during installation:
1) Installed the EPEL Repositories.
2) Installed PHP-MYSQL, MYSQL-SERVER packages.
3) Created a user for mysql use.
4) Started the mysql and http services (service mysqld start and service httpd start)
When I access the site,
http://vps_ip_address/phpmyadmin I just get "The requested URL /phpmyadmin was not found on this server."
Can someone help me in configuring this?
Re: Configuring mysql stuffs on VPS -
Sithis - 13.03.2015
phpmyadmin isn't a part of mysql server, try:
Quote:
sudo yum install phpmyadmin
|
Re: Configuring mysql stuffs on VPS -
biker122 - 13.03.2015
Looks like I didn't mention that one, I've already installed phpmyadmin..
Re: Configuring mysql stuffs on VPS -
Sithis - 13.03.2015
Did you install via yum?
EDIT: try this:
Create a link in /var/www/phpmyadmin like this:
sudo ln -s /your/phpmyadmin/dir /var/www/phpmyadmin
Re: Configuring mysql stuffs on VPS -
biker122 - 13.03.2015
Yes I did. I've done everything as the root user.
Re: Configuring mysql stuffs on VPS -
biker122 - 13.03.2015
Sorry for the double-post!
A small improvement now. I'm now getting "You don't have permission to access /phpmyadmin/ on this server."
Re: Configuring mysql stuffs on VPS -
Sithis - 13.03.2015
Find phpMyAdmin.conf.
By default, it only allows localhost. Also make sure to either
allow from YOURIP/all and remove any
deny from all
Re: Configuring mysql stuffs on VPS -
kirostar - 13.03.2015
Installation:
1- Add EPEL Repositories:
cd ~
wget
http://download.fedoraproject.org/pu...6-8.noarch.rpm
sudo rpm -ivh epel-release*
rm epel-release*
2- Download And Configure MYSQL
sudo yum install mysql-server
sudo service mysqld start
sudo mysql_install_db
sudo mysql_secure_installation
Код:
You will be asked a number of questions:
Enter current password for root: press Enter
Set root password? Y
New password: Type an administrative password here
Re-enter new password: Confirm the password
Remove anonymous users? Y
Disallow root login remotely? Y
Remove test database and access to it? Y
Reload privilege tables now? Y
Your MySQL installation should be up and running. Test that you can log in with the password you set by typing:
mysql -u root -p
Type exit to return to the shell prompt:
exit
3- Download phpMyAdmin
sudo yum install phpmyadmin
4- Configure PhpMyAdmin
sudo nano /etc/httpd/conf.d/phpMyAdmin.conf
sudo service httpd start
It should work.. Try it.
Re: Configuring mysql stuffs on VPS -
Jake187 - 13.03.2015
The best way to install mySQL and phpmyadmin is as follows.
Download and use the official mySQL Yum Repo at
http://dev.mysql.com/downloads/repo/yum/
This repo is officially from mySQL so you will receive the latest updates right away, a guide to install it and mySQL is available at
http://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/ simple way to install it is yum install mysql-community-server and make sure mysql-community-libs are installed if not yum install them as well.
Now you will need to install apache which is required for phpmyadmin so basic step is just yum install httpd
And now you will need to install PHP I don't recommend the default PHP version that is offered by the CentOS repo because it's very outdated you can use webstatic which provides the latest PHP releases via repo at
https://webtatic.com/packages/php56/
Now as stated on here you have EPEL install phpmyadmin from that so once EPEL repo is enabled when you do yum install phpmyadmin it should be installing version 4.0.10.8
Once you installed everything make sure you securely setup mySQL and start it up, than start up apache and phpmyadmin will be running.
Just to remind you Apache and PHP is required for phpmyadmin to run.
Re: Configuring mysql stuffs on VPS -
Sithis - 13.03.2015
Did the last two guys even read? He already did that.
Re: Configuring mysql stuffs on VPS -
biker122 - 15.03.2015
Quote:
Originally Posted by kirostar
Guys, I got this problem before... But can't remember it
but try to enter this command: sudo mysql_secure_installation
and if you got the error too... re-install vps and try again.
I don't try to be smartass... but this way should work..
|
There's no use in talking to you, since you're just posting the tutorials which you've got from google search..
@Jake187: Here's my phpMyAdmin.conf file
Code:
# phpMyAdmin - Web based MySQL browser written in php
#
# Allows only localhost by default
#
# But allowing phpMyAdmin to anyone other than localhost should be considered
# dangerous unless properly secured by SSL
Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin
<Directory /usr/share/phpMyAdmin/>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from none
Allow from all
</IfModule>
</Directory>
<Directory /usr/share/phpMyAdmin/setup/>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from none
Allow from all
</IfModule>
</Directory>
# These directories do not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
#
<Directory /usr/share/phpMyAdmin/libraries/>
Order Deny,Allow
Deny from none
Allow from all
</Directory>
<Directory /usr/share/phpMyAdmin/setup/lib/>
Order Deny,Allow
Deny from none
Allow from all
</Directory>
<Directory /usr/share/phpMyAdmin/setup/frames/>
Order Deny,Allow
Deny from none
Allow from all
</Directory>
# This configuration prevents mod_security at phpMyAdmin directories from
# filtering SQL etc. This may break your mod_security implementation.
#
#<IfModule mod_security.c>
# <Directory /usr/share/phpMyAdmin/>
# SecRuleInheritance Off
# </Directory>
#</IfModule>
Re: Configuring mysql stuffs on VPS -
Jake187 - 15.03.2015
reset your configuration to the following and replace YOURIP with your actual IP and don't change anything else and let's see if it works and
PLEASE don't let everyone have access to your /setup folders.
Quote:
# phpMyAdmin - Web based MySQL browser written in php
#
# Allows only localhost by default
#
# But allowing phpMyAdmin to anyone other than localhost should be considered
# dangerous unless properly secured by SSL
Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin
<Directory /usr/share/phpMyAdmin/>
AddDefaultCharset UTF-8
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
Require ip 127.0.0.1
Require ip ::1
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from YOURIP
</IfModule>
</Directory>
<Directory /usr/share/phpMyAdmin/setup/>
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
Require ip 127.0.0.1
Require ip ::1
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
</IfModule>
</Directory>
# These directories do not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
#
<Directory /usr/share/phpMyAdmin/libraries/>
Order Deny,Allow
Deny from All
Allow from None
</Directory>
<Directory /usr/share/phpMyAdmin/setup/lib/>
Order Deny,Allow
Deny from All
Allow from None
</Directory>
<Directory /usr/share/phpMyAdmin/setup/frames/>
Order Deny,Allow
Deny from All
Allow from None
</Directory>
# This configuration prevents mod_security at phpMyAdmin directories from
# filtering SQL etc. This may break your mod_security implementation.
#
#<IfModule mod_security.c>
# <Directory /usr/share/phpMyAdmin/>
# SecRuleInheritance Off
# </Directory>
#</IfModule>
|
Once you replace it with that restart your apache and also as I stated please make sure you can view your Default CentOS page from
http://your_vps_ip
Re: Configuring mysql stuffs on VPS -
biker122 - 15.03.2015
"You don't have permissions ....." and shit now :/
Re: Configuring mysql stuffs on VPS -
Jake187 - 15.03.2015
Quote:
Originally Posted by biker122
"You don't have permissions ....." and shit now :/
|
This is on your default page as well?
Re: Configuring mysql stuffs on VPS -
biker122 - 15.03.2015
Nah, I'm able to see the Apache 2.0's default page but can't access ip/phpmyadmin section.
Re: Configuring mysql stuffs on VPS -
Parallax - 15.03.2015
Did you restart httpd (apache) for every changes you did to the config files? Check your /var/log/httpd to see if there's any clue regarding this issue.. probably SELinux isn't disabled in your server?
Re: Configuring mysql stuffs on VPS -
Jake187 - 16.03.2015
Quote:
Originally Posted by biker122
Nah, I'm able to see the Apache 2.0's default page but can't access ip/phpmyadmin section.
|
Sounds quite weird than your Apache is fine if you're restarting your Apache than your permissions should change fine. I'd remove phpmyadmin and attempt reinstalling it.
Re: Configuring mysql stuffs on VPS -
FOTIS6 - 16.03.2015
Try to add this in the bottom of apache2.conf/httpd.conf file. (If you haven't already)
Code:
Include /etc/phpmyadmin/apache.conf
or
Code:
Include /etc/phpmyadmin/lighttpd.conf
Depending on what you use.
Then restart apache/httpd, it should work.