Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

0 votes
1 answers
2087 views
Selinux php-fpm httpd and mariadb socket connection
*New note with important details* I just ran a few version tests and resulted in the following: Alright, here’s my latest update: - 10.5 works - 10.6 doesn’t - 10.7 works - 10.8 work - etc. I was hoping to use 10.6 since it is the LTS release…clearly there is something wrong with it though. I’m on t...
*New note with important details* I just ran a few version tests and resulted in the following: Alright, here’s my latest update: - 10.5 works - 10.6 doesn’t - 10.7 works - 10.8 work - etc. I was hoping to use 10.6 since it is the LTS release…clearly there is something wrong with it though. I’m on the MariaDB slack channel at the moment, but for now I’ll revert to 10.5 from the MariaDB repo, since that has support for 2 years-ish. Am I missing something else? I didn't change anything but the MariaDB version and restarting the process. *Edit note for reference* Installing the EL Repo MariaDB 10.5 installs a package "mysql-selinux" and the default repo (epel-release?) allows the necessary communications and php-fpm can connect to mariadb fine. It seems like maybe the MariaDB repo package is missing this functionality. I would have installed the EL repo MariaDB on my AL 8.6 system, but removed it and went with the MariaDB repo for regular operation. I found the source for "mysql-selinux" here and it's not trivial like my "fix": https://github.com/devexp-db/mysql-selinux/blob/master/mysql.te this package is NOT installed on my 8.6 system which works... ***** I have a system running fine with SELinux enabled on AlmaLinux 8.6. I'm using stock AL 8.6 Apache/httpd (2.4.37 I think) and php from Remi's Repo: https://rpms.remirepo.net/wizard/ I initially installed MariaDB 10.4 directly from the MariaDB repo using these instructions: https://mariadb.com/resources/blog/how-to-install-mariadb-on-rhel8-centos8/ SELinux is enabled and I don't believe I made any customizations specifically for php-fpm to connect to the mysql.sock socket/process. I recently upgraded to MariaDB 10.6, again from the MariaDB repo, and everything continued working as it always did. For reference my "working" validation is using phpMyAdmin configured to connect through a local socket. I've installed my AlmaLinux 9 VM with stock Apache/httpd (2.4.51 I think). I installed MariaDB 10.6 from the same repo with the same instructions. Now, I'm getting a denial from SELinux for php-fpm (running as httpd_t) trying to connect to the /var/lib/mysql/mysql.sock process (running as unconfinsed_service_t). This denial prevents the connection and subsequent login from phpMyAdmin (running under the php-fpm service):
time->Mon Sep 26 22:14:07 2022
type=PROCTITLE msg=audit(1664244847.002:83): proctitle=7068702D66706D3A20706F6F6C20777777
type=SYSCALL msg=audit(1664244847.002:83): arch=c000003e syscall=42 success=no exit=-13 a0=5 a1=7ffc156c46b0 a2=1b a3=557032b785a0 items=0 ppid=706 pid=738 auid=4294967295 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) ses=4294967295 comm="php-fpm" exe="/opt/remi/php74/root/usr/sbin/php-fpm" subj=system_u:system_r:httpd_t:s0 key=(null)
type=AVC msg=audit(1664244847.002:83): avc:  denied  { connectto } for  pid=738 comm="php-fpm" path="/var/lib/mysql/mysql.sock" scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:system_r:unconfined_service_t:s0 tclass=unix_stream_socket permissive=0
This ONLY shows up on my AL 9 install, AL 8.6 does not report this denial and allows the connection and subsequent login. I checked the file and process SELinux contexts and they are the same between 8.6 and 9. I've also tried different php-fpm versions, including the same between my 8.6 install and 9 (both php 7.4 from Remi). I've tried running the fpm pool under apache:apache and under my phpMyAdmin user with group apache. Any advice on how to track this down? I can "fix" the SELinux denial with the following policy, but it allows httpd to connect to any unconfined process:
module phpfpm_mariadb_socket 1.0;

require {
        type httpd_t;
        type unconfined_service_t;
        class unix_stream_socket connectto;
}

#============= httpd_t ==============
allow httpd_t unconfined_service_t:unix_stream_socket connectto;
I see two obvious differences: Apache 2.4.37 vs 2.4.51 (and potential related SELinux policy changes which I couldn't track down) and EL 8.6 vs EL 9 SELinux core changes (both had "latest" available updates applied). I copied the phpMyAdmin install from my 8.6 system into my 9 system, under the same usernames with the same permissions. I don't think that the php-fpm user:group configuration is relevant to the process contexts, or is it?
Brian (292 rep)
Sep 27, 2022, 11:42 AM • Last activity: Jul 23, 2025, 05:03 PM
-1 votes
1 answers
43 views
Cannot load PHPMyAdmin page after install on Red Hat Linux 9.4 using dnf
I installed PHPMyAdmin on a Red Hat 9 server using dnf. I am using PHP 8.3.22 and Apache 2.4.62 (Red Hat Enterprise Linux). The following is listed in my /etc/httpd/conf.d/phpMyAdmin.conf file: Alias /phpMyAdmin /usr/share/phpMyAdmin Alias /phpmyadmin /usr/share/phpMyAdmin Require all granted When I...
I installed PHPMyAdmin on a Red Hat 9 server using dnf. I am using PHP 8.3.22 and Apache 2.4.62 (Red Hat Enterprise Linux). The following is listed in my /etc/httpd/conf.d/phpMyAdmin.conf file: Alias /phpMyAdmin /usr/share/phpMyAdmin Alias /phpmyadmin /usr/share/phpMyAdmin Require all granted When I try to access /phpMyAdmin from a web browser, I get the following error: "Forbidden You don't have permission to access this resource." How do I fix this? I should be getting a login page. ETA: The apache user has execute permissions on /usr/share/phpMyAdmin/ and all its parents, so I assume permissions are not the issue. Running the command getenforce returns Permissive, so I assume SELinux is not the issue. ETA2: I changed my /etc/httpd/conf.d/phpMyAdmin.conf file's Directory section to the following and did service httpd restart: Options FollowSymlinks AllowOverride None Require all granted
MrSnrub (235 rep)
Jun 27, 2025, 01:01 PM • Last activity: Jul 11, 2025, 11:06 AM
2 votes
2 answers
142 views
How can I append a # in front of each line of a block of text?
This is part of my PHP Myadmin's configuration file: Alias /phpMyAdmin /usr/share/phpMyAdmin Alias /phpmyadmin /usr/share/phpMyAdmin AddDefaultCharset UTF-8 # Apache 2.4 Require ip 127.0.0.1 Require ip ::1 # Apache 2.2 Order Deny,Allow Deny from All Allow from 127.0.0.1 Allow from ::1 # Apache 2.4 I...
This is part of my PHP Myadmin's configuration file: Alias /phpMyAdmin /usr/share/phpMyAdmin Alias /phpmyadmin /usr/share/phpMyAdmin AddDefaultCharset UTF-8 # Apache 2.4 Require ip 127.0.0.1 Require ip ::1 # Apache 2.2 Order Deny,Allow Deny from All Allow from 127.0.0.1 Allow from ::1 # Apache 2.4 I want to add # in front of each line starting from the first ` and until `. How can I do this?
The One (5112 rep)
Apr 28, 2016, 09:04 AM • Last activity: Apr 23, 2025, 03:05 PM
2 votes
1 answers
1802 views
phpmyadmin doesn't work after installing php5-mysqlnd
I am currently running into some problems with phpMyAdmin. I set everything up correctly and made sure everything worked. Then later after some developing on some pages I noticed I couldn't execute `mysqli_result::fetch_all()`. So I did my research and found out I only had to install the package `ph...
I am currently running into some problems with phpMyAdmin. I set everything up correctly and made sure everything worked. Then later after some developing on some pages I noticed I couldn't execute mysqli_result::fetch_all(). So I did my research and found out I only had to install the package php5-mysqlnd. So I did (apt-get install php5-mysqlnd). The installation did not fail and my PHP script could execute the mysqli_result::fetch_all() method. However, phpmyadmin doesn't work anymore. It simply can't connect to the MySQL server anymore (all logins fail). ***NOTE:** every other script still has no problem connecting and logging in into the MySQL server. I also did not change any passwords. Login over the console is also possible.* I couldn't get it to work with the package installed. Then I reinstalled php5-mysql (which uninstalled php5-mysqlnd) and phpmyadmin worked again! Not having the mysqli_result::fetch_all() method is not a major issue but if it is possible I would like to use it anyways. Simply because it is so convenient for debugging! I am running a Nginx server and Debian 7.5 3.10.23 system.
BrainStone (3784 rep)
Jun 6, 2014, 07:01 PM • Last activity: May 12, 2024, 09:07 AM
0 votes
0 answers
482 views
Cant Access Phpmyadmin on Ubuntu LTS 22.04 (HTTP Error Code 500)
I just installed `phpmyadmin` on my PC. I followed several instructions such as: ```shell sudo apt update sudo apt install phpmyadmin sudo ln -s /usr/share/phpmyadmin /var/www/your_domain/phpmyadmin ``` I use NGINX as the webserver and PHP version 7.4. Previously, I had tried to install several addi...
I just installed phpmyadmin on my PC. I followed several instructions such as:
sudo apt update
sudo apt install phpmyadmin
sudo ln -s /usr/share/phpmyadmin /var/www/your_domain/phpmyadmin
I use NGINX as the webserver and PHP version 7.4. Previously, I had tried to install several additional PHP modules such as php-curl, php-mbstring, php-json. But it still displays the HTTP error 500 error. Did I miss an installation step or miss some module so that phpmyadmin can't be accessed?
Dans988 (1 rep)
Jan 9, 2024, 05:02 AM • Last activity: Jan 9, 2024, 09:49 AM
2 votes
2 answers
1930 views
Can't Login to phpmyadmin without using password
I would like to logging into phpmyadmin without using password. However I changed `AllowNoPassword` to `TRUE` in `/etc/webapps/phpmyadmin/config.inc.php` : $cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['AllowNoPassword'] = true; But, phpmyadmin asks me for password again! **P.S:** MySQL...
I would like to logging into phpmyadmin without using password. However I changed AllowNoPassword to TRUE in /etc/webapps/phpmyadmin/config.inc.php : $cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['AllowNoPassword'] = true; But, phpmyadmin asks me for password again! **P.S:** MySQL root user has no password.
Hamed Kamrava (7168 rep)
Jul 18, 2014, 05:59 PM • Last activity: Oct 31, 2023, 11:02 PM
0 votes
1 answers
1172 views
Install phpMyAdmin 5.2.1 with apt on Debian 11 with php8.1
`apt install phpmyadmin` on Debian 11 installs the old versin 5.0.4 that is not php8.1 compatible. How do I install the latest version via apt?
apt install phpmyadmin on Debian 11 installs the old versin 5.0.4 that is not php8.1 compatible. How do I install the latest version via apt?
rubo77 (30435 rep)
Feb 21, 2023, 05:09 PM • Last activity: Sep 20, 2023, 02:57 PM
0 votes
0 answers
28 views
Solution to phpMyAdmin login problem seems unsafe
I had trouble logging into my myPhpAdmin web interface, so after finding numerous posts suggesting I added my un/pw to the config file like this: $cfg['Servers'][$i]['user'] = 'root'; //mysql username here $cfg['Servers'][$i]['password'] = 'password'; //mysql password here It surprisingly worked. Bu...
I had trouble logging into my myPhpAdmin web interface, so after finding numerous posts suggesting I added my un/pw to the config file like this: $cfg['Servers'][$i]['user'] = 'root'; //mysql username here $cfg['Servers'][$i]['password'] = 'password'; //mysql password here It surprisingly worked. But...it seems ridiculous that I need to expose my un/pw in a config file just for this to work! Is there a better solution? (And yes I'm putting the same un/pw into the config file that is refused in the phpMyAdmin login window)
TSG (1983 rep)
Aug 5, 2023, 02:08 AM • Last activity: Aug 6, 2023, 12:19 AM
1 votes
1 answers
2151 views
Problem with phpmyadmin
When I go to the web page http://localhost/phpmyadmin, it shows The localhost page isn’t working localhost is currently unable to handle this request. HTTP ERROR 500 Apache error log is: [Tue Jun 14 16:35:47.699632 2016] [:error] [pid 14660] [client 192.168.0.101:44854] PHP Fatal error: require_once...
When I go to the web page http://localhost/phpmyadmin, it shows The localhost page isn’t working localhost is currently unable to handle this request. HTTP ERROR 500 Apache error log is: [Tue Jun 14 16:35:47.699632 2016] [:error] [pid 14660] [client 192.168.0.101:44854] PHP Fatal error: require_once(): Failed opening required '/usr/share/php/php-gettext/gettext.inc' (include_path='.:/usr/share/php') in /usr/share/phpmyadmin/libraries/select_lang.lib.php on line 477 Also inside phpmyadmin it's showing this error: Connection for controluser as defined in your configuration failed. Please help!
chrisjzach (11 rep)
Jun 14, 2016, 11:47 AM • Last activity: Jul 27, 2023, 11:59 AM
1 votes
1 answers
1080 views
Install phpMyAdmin on hostname in Webmin/Virtualmin for all accounts (on hostname) automatically like cPanel does?
The way Webmin seems to install phpMyAdmin is to install it inside the public_html directory. e.g. https://mydomain.com/phpMyAdmin I don't want to debate the vulnerability, instead I want phpMyAdmin to function on Webmin like it does in cPanel. One recommendation was to create a subdomain and instal...
The way Webmin seems to install phpMyAdmin is to install it inside the public_html directory. e.g. https://mydomain.com/phpMyAdmin I don't want to debate the vulnerability, instead I want phpMyAdmin to function on Webmin like it does in cPanel. One recommendation was to create a subdomain and install it there, but this is an extra step every time. cPanel doesn't have phpMyAdmin even accessible by the domain. Instead, it is located like this: https://server1.myserver.com:2083/cpsess9292847592/3rdparty/phpMyAdmin/index.php And it's only accessible through the web control panel. It seems to add a session ID to the URL too so it's only even valid for the current login, and then the URL doesn't exist if the user logs out or the session isn't valid. Even better, this is also accessible by admins through WHM in one central place. How can I get phpMyAdmin to install automatically for every use like it does in cPanel, and to install in a non-public directory that uses the server hostname like cPanel does?
user7211 (43 rep)
Jun 15, 2022, 07:31 AM • Last activity: May 18, 2023, 02:22 AM
1 votes
1 answers
1460 views
Chromebook crouton LAMP
I'm trying to install a LAMP stack on Ubuntu through crouton on a Chromebook (Acer c720p). I was able to install the following packages apache2 mysql-client mysql-server php5 libapache2-mod-php5 and the localhost folder works correctly. When I try to install phpmyadmin I get the following error: ERR...
I'm trying to install a LAMP stack on Ubuntu through crouton on a Chromebook (Acer c720p). I was able to install the following packages apache2 mysql-client mysql-server php5 libapache2-mod-php5 and the localhost folder works correctly. When I try to install phpmyadmin I get the following error: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' The only way to exit from the sudo apt-get installation is to ignore the error. Then, if I go to localhost/phpmyadmin, phpmyadmin looks to work, but I cannot log in and I get #2002 Cannot log in to the MySQL server Connection for controluser as defined in your configuration failed. How do I configure MySQL so that phpmyadmin is able to connect to it?
Sfrow (111 rep)
Mar 28, 2015, 07:48 PM • Last activity: Nov 8, 2022, 06:01 PM
0 votes
1 answers
3679 views
How can I run mariadb and phpmyadmin podman containers and access my database from phpmyadmin?
I want to run database on CentOS Stream system using podman containers and access it with phpmyadmin that is running on another container. I created my mariadb container using this command: ``` podman run \ --name mariadb0 \ -p 3306:3306 \ -v /var/www/mariadb:/var/lib/mysql:Z \ -e MYSQL_ROOT_PASSWOR...
I want to run database on CentOS Stream system using podman containers and access it with phpmyadmin that is running on another container. I created my mariadb container using this command:
podman run \
 --name mariadb0 \
 -p 3306:3306 \
 -v /var/www/mariadb:/var/lib/mysql:Z \
 -e MYSQL_ROOT_PASSWORD=password \
 -d docker.io/library/mariadb
I can reach the database but I struggle to create phpmyadmin container which could be used to access my database. I don't know how to solve this. Do you have any idea how to do this?
CHEWKOK (25 rep)
May 11, 2021, 10:09 AM • Last activity: Oct 24, 2022, 01:50 PM
1 votes
0 answers
585 views
No package phpmyadmin available. Error nothing to do
Im using system Centos 7 Now in my VPS I have configure correct LAMP and directadmin. Php, apache web server etc working correct. I have issue with phpmyadmin. I see phpmyadmin is not available in build in repo centos and require install EPEL. So I do it: [root@~]# yum install epel-release -y Loaded...
Im using system Centos 7 Now in my VPS I have configure correct LAMP and directadmin. Php, apache web server etc working correct. I have issue with phpmyadmin. I see phpmyadmin is not available in build in repo centos and require install EPEL. So I do it: [root@~]# yum install epel-release -y Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: ftp.fi.muni.cz * epel: mirror.vpsnet.com * extras: ftp.fi.muni.cz * updates: ftp.fi.muni.cz Package epel-release-7-14.noarch already installed and latest version Nothing to do Now I again try install phpmyadmin: [root@ ~]# sudo yum -y install phpmyadmin Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: ftp.fi.muni.cz * epel: mirror.vpsnet.com * extras: ftp.fi.muni.cz * updates: ftp.fi.muni.cz No package phpmyadmin available. Still the same issue. Any solution? I try this: [root@ ~]# cd /usr/local/directadmin/custombuild [root@ custombuild]# ./build phpmyadmin Downloading webapps.logrotate... ######################################################################## 100.0% Downloading phpMyAdmin-5.1.3-all-languages.tar.gz... ######################################################################## 100.0% Adding AuthLog to /var/www/html/phpMyAdmin-5.1.3-all-languages/config.inc.php Adding PmaNoRelation_DisableWarning to /var/www/html/phpMyAdmin-5.1.3-all-languages/config.inc.php phpMyAdmin 5.1.3-all-languages installation is done. [root@custombuild]# Now is installed but when I access to my_ip/phpmyadmin then still not found. Anysolution?
Jan Kowalski (11 rep)
Apr 26, 2022, 03:12 PM • Last activity: Apr 26, 2022, 03:18 PM
1 votes
1 answers
4827 views
How to update apache, mysql, phpmyadmin and php on Raspbian?
I have my own web server running on my raspberry pi, and all my programs are outdated. I would like to update my PHP, Apache, MySQL, and phpMyAdmin. Can anyone tell me how to update all of these? I'm running a Debian distro called raspbian.
I have my own web server running on my raspberry pi, and all my programs are outdated. I would like to update my PHP, Apache, MySQL, and phpMyAdmin. Can anyone tell me how to update all of these? I'm running a Debian distro called raspbian.
Surya Mani (13 rep)
Nov 14, 2015, 02:54 PM • Last activity: Apr 12, 2022, 07:23 AM
1 votes
0 answers
1115 views
CentOs 8 Stream phpMyAdmin - "Access denied" when accessing via browser
after fresh install of phpMyAdmin on CentOS 8 Stream I've got problem with "Access Denied". There isn't more than only simple text. Console of browser says: Failed to load resource: the server responded with a status of 403 (Forbidden) The `/var/log/httpd/error_log` : [Mon Apr 04 15:08:21.674947 202...
after fresh install of phpMyAdmin on CentOS 8 Stream I've got problem with "Access Denied". There isn't more than only simple text. Console of browser says: Failed to load resource: the server responded with a status of 403 (Forbidden) The /var/log/httpd/error_log : [Mon Apr 04 15:08:21.674947 2022] [proxy_fcgi:error] [pid XXX] [client XXX] AH01071: Got error 'Unable to open primary script: /var/www/html/phpmyadmin/index.php (Permission denied)' I've installed it at /var/www/html/phpmyadmin. Nothing special has done. Configured phpmyadmin.conf at /etc/httpd/conf.d like: Alias /phpmyadmin /var/www/html/phpmyadmin AddDefaultCharset UTF-8 # Apache 2.4 Require all granted # Apache 2.2 Order Deny,Allow Deny from All Allow from 127.0.0.1 Allow from ::1 # Apache 2.4 Require all granted # Apache 2.2 Order Deny,Allow Deny from All Allow from 127.0.0.1 Allow from ::1 Also granted to apache: [root@machine html]$ ll -a total 4 drwxrwxrwx. 3 root root 24 Aug 3 2021 . drwxr-xr-x. 5 root root 63 Feb 1 11:53 .. drwxr-xr-x. 13 apache apache 4096 Mar 3 2022 phpmyadmin I haven't done nothing more. Does someone has an idea?
kalview (111 rep)
Apr 4, 2022, 01:19 PM • Last activity: Apr 4, 2022, 01:27 PM
1 votes
1 answers
707 views
Can't login to phpMyAdmin on Centos, Google Cloud
In my MySQL database, I've created two users, one regular user (who has privileges for one database) and one superuser. When I want to login via any of these accounts to phpMyAdmin I get a "Cannot log in to the MySQL server" error. (I'm accessing remotely) Inside ` ` in my `/etc/httpd/conf.d/phpMyAd...
In my MySQL database, I've created two users, one regular user (who has privileges for one database) and one superuser. When I want to login via any of these accounts to phpMyAdmin I get a "Cannot log in to the MySQL server" error. (I'm accessing remotely) Inside ` in my /etc/httpd/conf.d/phpMyAdmin.conf` file: AddDefaultCharset UTF-8 # Apache 2.4 Require all granted Require ip 127.0.0.1 Require ip ::1 # Apache 2.2 Order Deny,Allow Allow from All Allow from 127.0.0.1 Allow from ::1 I've also provided a user and password for my super admin in config.inc.php file. What am I missing? Should I do something about Google firewalls? I haven't configured the firewall rule for MySQL, should I do that now? EDIT: I've also tried from this answer: https://serverfault.com/questions/299365/cant-login-to-phpmyadmin $cfg['blowfish_secret'] = 'myPassword'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ Still not working I can log in to MySql via SSH terminal. But I can't with phpMyAdmin login page.
LosmiNCL (121 rep)
Jan 24, 2022, 07:28 PM • Last activity: Jan 24, 2022, 10:12 PM
0 votes
1 answers
355 views
How to use Available Package instead of Installed Package when Yum spits out a required error
First and foremost, I blindly followed a tutorial to upgrade from PHP 7.3 to PHP 7.4, which called for `yum remove "php*" -y` Of course this just screwed up everything. It removed two very important apps, including `roundcubemail` and `phpmyadmin` Now what I get is certain packages cannot be install...
First and foremost, I blindly followed a tutorial to upgrade from PHP 7.3 to PHP 7.4, which called for yum remove "php*" -y Of course this just screwed up everything. It removed two very important apps, including roundcubemail and phpmyadmin Now what I get is certain packages cannot be installed, and spits out this, as an example: Error: Package: php-pecl-zip-1.20.0-1.el7.remi.5.4.x86_64 (remi) Requires: php(zend-abi) = 20100525-64 Installed: php-common-7.4.27-1.el7.remi.x86_64 (@remi-php74) php(zend-abi) = 20190902-64 Available: php-common-5.4.16-48.el7.x86_64 (base) php(zend-abi) = 20100525-64 Available: php-common-5.4.45-18.el7.remi.x86_64 (remi) php(zend-abi) = 20100525-64 Now, under available, you have php-common-5.4.45-18.el7.remi.x86_64 which carries the php(zend-abi) = 20100525-64 version needed. Now according to Yum... this is installed: Package matching php-common-5.4.45-18.el7.remi.x86_64 already installed. Checking for update. My question is, how can I force it detect the available version, instead of the installed version, as the available version is installed and has the right version.
Matthew Koster (1 rep)
Dec 22, 2021, 10:50 PM • Last activity: Dec 22, 2021, 11:14 PM
1 votes
1 answers
354 views
phpMyAdmin don't have permission to read file
I want to create a secure connection between PHP and MySQL database. In order to do this, I need to store the DB infos in a separated file, with `-r--------` permission (readonly for owner). But doing like this, PHP seems impossible to open the file, making impossible the connection. What do I have...
I want to create a secure connection between PHP and MySQL database. In order to do this, I need to store the DB infos in a separated file, with -r-------- permission (readonly for owner). But doing like this, PHP seems impossible to open the file, making impossible the connection. What do I have to do? Do I have to run phpMyAdmin as root? EDIT: This is the result of the ls -l command. Thank you for help.
-none
-r-----r-- 1 root root 56 Jul 10 13:01 db.ini
Mattia Monari (13 rep)
Jul 20, 2020, 01:20 PM • Last activity: Sep 24, 2021, 07:30 AM
0 votes
1 answers
163 views
phpMyAdmin and MySQL 8.0 gives error
**H!@all** I am new to databases and this is the first time I have installed a MySQL-Server. When I run commands in phpMyAdmin I keep getting error messages. I have noticed that the syntax in MySQL 8.0 has changed. As I understand it, phpMyAdmin still runs with the old syntaxes. What options do I ha...
**H!@all** I am new to databases and this is the first time I have installed a MySQL-Server. When I run commands in phpMyAdmin I keep getting error messages. I have noticed that the syntax in MySQL 8.0 has changed. As I understand it, phpMyAdmin still runs with the old syntaxes. What options do I have to manage MySQL 8.0 via a graphical user interface? phpMyAdmin error
Teso (145 rep)
May 14, 2021, 06:06 PM • Last activity: May 14, 2021, 06:43 PM
0 votes
1 answers
117 views
Restore mysql db from AWS AMI?
We have one EC2 instance running our mysql database server. due to a security incident we had to delete the current EC2 instance as database was completely messed up with some sort of encryption. So we had to recover it from Snapshot/AMI that are being taken every 6 hours. we have past 1 months snap...
We have one EC2 instance running our mysql database server. due to a security incident we had to delete the current EC2 instance as database was completely messed up with some sort of encryption. So we had to recover it from Snapshot/AMI that are being taken every 6 hours. we have past 1 months snapshots and AMI's available for this EC2 instance. This EC2 instance has only one SSD (Persistent Block Storage) EBS volume, which is part of the Snapshots/AMI's. We also have phpmyadmin installed but its not able to connect to DB for obvious reasons! Below are the details of OS and the mysql Service status. **# cat /etc/*release*** DISTRIB_ID=Ubuntu DISTRIB_RELEASE=20.04 DISTRIB_CODENAME=focal DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS" NAME="Ubuntu" VERSION="20.04.1 LTS (Focal Fossa)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 20.04.1 LTS" VERSION_ID="20.04" HOME_URL="https://www.ubuntu.com/ " SUPPORT_URL="https://help.ubuntu.com/ " BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/ " PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy " VERSION_CODENAME=focal UBUNTU_CODENAME=focal **# mysqld --version** /usr/sbin/mysqld Ver 8.0.22-0ubuntu0.20.04.2 for Linux on x86_64 ((Ubuntu)) **# systemctl status mysql.service** ● mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) Active: activating (start) since Mon 2021-03-01 13:19:50 UTC; 241ms ago Process: 79728 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS) Main PID: 79736 (mysqld) Status: "Server startup in progress" Tasks: 1 (limit: 1164) Memory: 91.3M CGroup: /system.slice/mysql.service └─79736 /usr/sbin/mysqld Mar 01 13:19:50 ip-172-31-93-250 systemd[1] : Starting MySQL Community Server... Mar 01 13:19:52 ip-172-31-93-250 systemd[1] : mysql.service: Main process exited, code=exited, status=1/FAILURE Mar 01 13:19:52 ip-172-31-93-250 systemd[1] : mysql.service: Failed with result 'exit-code'. Mar 01 13:19:52 ip-172-31-93-250 systemd[1] : Failed to start MySQL Community Server. Mar 01 13:19:53 ip-172-31-93-250 systemd[1] : mysql.service: Scheduled restart job, restart counter is at 328. Mar 01 13:19:53 ip-172-31-93-250 systemd[1] : Stopped MySQL Community Server. Mar 01 13:19:53 ip-172-31-93-250 systemd[1] : Starting MySQL Community Server... **# journalctl -xe** Mar 01 13:14:20 ip-XXX-XXX-XXX-XXX systemd[1] : mysql.service: Main process exited, code=exited, status=1/FAILURE -- Subject: Unit process exited -- Defined-By: systemd -- Support: http://www.ubuntu.com/support -- -- An ExecStart= process belonging to unit mysql.service has exited. -- -- The process' exit code is 'exited' and its exit status is 1. Mar 01 13:14:20 ip-XXX-XXX-XXX-XXX systemd[1] : mysql.service: Failed with result 'exit-code'. -- Subject: Unit failed -- Defined-By: systemd -- Support: http://www.ubuntu.com/support -- -- The unit mysql.service has entered the 'failed' state with result 'exit-code'. Mar 01 13:14:20 ip-XXX-XXX-XXX-XXX systemd[1] : Failed to start MySQL Community Server. -- Subject: A start job for unit mysql.service has failed -- Defined-By: systemd -- Support: http://www.ubuntu.com/support -- -- A start job for unit mysql.service has finished with a failure. -- -- The job identifier is 105083 and the job result is failed. Mar 01 13:14:21 ip-XXX-XXX-XXX-XXX systemd[1] : mysql.service: Scheduled restart job, restart counter is at 206. -- Subject: Automatic restarting of a unit has been scheduled -- Defined-By: systemd -- Support: http://www.ubuntu.com/support -- -- Automatic restarting of the unit mysql.service has been scheduled, as the result for -- the configured Restart= setting for the unit. Mar 01 13:14:21 ip-XXX-XXX-XXX-XXX systemd[1] : Stopped MySQL Community Server. -- Subject: A stop job for unit mysql.service has finished -- Defined-By: systemd -- Support: http://www.ubuntu.com/support -- -- A stop job for unit mysql.service has finished. -- -- The job identifier is 105149 and the job result is done. Mar 01 13:14:21 ip-XXX-XXX-XXX-XXX systemd[1] : Starting MySQL Community Server... -- Subject: A start job for unit mysql.service has begun execution -- Defined-By: systemd -- Support: http://www.ubuntu.com/support -- -- A start job for unit mysql.service has begun execution. -- -- The job identifier is 105149. For additional Log output of **"# tail -500 /var/log/mysql/error.log"** Can any of you please help me restore the mysql service with the data/databases? We are not sure what is the right procedure to follow in this scenario to restore the databases. Thanks in advance!
Hrish (85 rep)
Mar 1, 2021, 03:16 PM • Last activity: Mar 3, 2021, 08:45 AM
Showing page 1 of 20 total questions