localhost/phpmyadmin giving page not found error - mysql

I'm running wampserver.
I had a mysql server crash, and the wampmysqld service would not start up. Also, localhost/phpmyadmin did not show phpmyadmin but gave me a 403 error. I installed the mysql-addon for another mysql version. Then I went to the wampserver icon and did Mysql > Version > and selected the add-on version I'd just downloaded.
This helped, wampmysqld was able to start up, the wampserver icon was able to go green all the way, and my application is working. However, phpmyadmin is giving a 404 error. How do I fix this?
phpmyadmin.conf is:
Alias /phpmyadmin "c:/wamp/apps/phpmyadmin3.3.9/"
# to give access to phpmyadmin from outside
# replace the lines
#
# Order Deny,Allow
# Deny from all
# Allow from 127.0.0.1
#
# by
#
# Order Allow,Deny
# Allow from all
#
<Directory "c:/wamp/apps/phpmyadmin3.3.9/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>
I changed c:/ to d:/ as per the location of phpmyadmin on my machine and restarted all services. But I'm still getting the same error.

You need to configure your apache2.conf to make phpMyAdmin works.
sudo nano /etc/apache2/apache2.conf
Then add the following line to the end of the file.
Include /etc/phpmyadmin/apache.conf
Then restart apache
/etc/init.d/apache2 restart

When you install a new phpmyadmin, or anything at all that refreshes the state of the apache.conf, there is usually need to retrace all previous manual inclusions in the config file.
Hence, given that when phpmyadmin is installed like in this tutorial, you added a line in the /etc/apache2/apache2.conf it becomes necessary to repeat that step:
Hence, running the command
sudo nano /etc/apache2/apache2.conf
and the including the following line at the end of the opened config file
Include /etc/phpmyadmin/apache.conf
usually solves this problem.
Remember to hit CTRL+O to save your changes, and then CTRL+X to close the open file.
Lastly, restart apache to let your new configuration take effect:
sudo systemctl restart apache2
That's it!

Start wamp or xamp make sure the icon color change to green for wamp. This time open it in another browsers not Internet explorer . it should work

Related

enable Binary logging in mysql 5.7.26

I have made some changes in my /etc/my.cnf to turn ON log_bin. I then rebooted the server. But when I do SHOW VARIABLES, the log_bin is still turned off. This means that mysql is not using /etc/my.cnf. Hence, I did locate my.cnf and there are no more paths for the file.
How can I turn on log_bin?
EDIT:
When I did sudo docker container ps, I can see a MYSQL image:
CONTAINER ID IMAGE COMMAND
asdshg3 mysql/mysql-server:5.7 "/entrypoint.sh mysq…"
I think this is the reason why my /etc/my.cnf is not getting picked up.

MariaDB configuration changes don't take effect

The server is working on CentOS 8, I'm trying to configure MariaDB by making alterations to /etc/my.cnf but then when I restart DB by doing sudo systemctl restart mariadb, the server does restart but no configuration changes get applied.
mysql > SHOW VARIABLES;
It outputs the same values. I tried to comment out the including directive #!includedir /etc/my.cnf.d and to add settings to [mysqld] and [mariadb] sections.
mysql --verbose --help says:
Default options are read from the following files in the given order:
/etc/my.cnf ~/.my.cnf.
The following groups are read: mysql client client-server client-mariadb
Check whether mysql uses the config file debugging it with strace:
sudo strace mysql
In the strace output, look for lines like:
openat(AT_FDCWD, "/etc/my.cnf", O_RDONLY|O_CLOEXEC) = ...
Make sure openat doesn't return -1. In that case check whether the file exists or mysql has enough permissions to read the file.
When adding additional configuration files, make sure that they are not writable by 'other'. Otherwise you'll have a message on mysql startup like:
Warning: World-writable config file '/etc/mysql/conf.d/myproject.cnf' is ignored
and the configuration does not get applied.

MySQL: "Found option without preceding group in config file"

I have a Windows machine on which I've moved the WAMP www and MySQL data directories to Dropbox.
Those Dropbox folders have downloaded to my Ubuntu laptop.
I'd like to run the websites in /home/me/Dropbox/WAMP/WWW on my Ubuntu laptop using the MySQL data in /home/me/Dropbox/WAMP/SQL/Data.
I've edited /etc/mysql/my.cnf:
datadir=/home/me/Dropbox/WAMP/SQL/Data
I've edited /etc/apache2/sites-available/default.conf:
<VirtualHost *:80>
DocumentRoot "\home\me\Dropbox\WAMP\WWW\site"
ServerName www.site.dev
ServerAlias www.site.dev
<Directory "\home\me\Dropbox\WAMP\WWW\site">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
I've edited /etc/hosts:
127.0.0.1 www.site.dev
I've restarted apache2, and when I run www.site.dev in my browser, I am taken to the default apache2 index.html.
When I run >mysql start, I receive:
mysql: [ERROR] Found option without preceding group in config file /etc/mysql/my.cnf at line 23!
mysql: [ERROR] Fatal error in defaults handling. Program aborted!
Line 23 of /etc/mysql/my.cnf is:
datadir=/home/me/Dropbox/WAMP/SQL/Data
Help appreciated.
From this answer, I've opened /etc/mysql/my.cnf in Sublime Text editor, and saved it as UT-8 (without BOM), and the issue remains.
Please add [mysqld] at the top of my.cnf and then restart mysql server.
service mysql restart
the file my.cnf should be saved as ANSI encode,and [mysqld] group at the start of the file.

Zabbix server is not running: the information displayed may not be current

So all of a sudden, after a week of using it, I get an error message on my zabbix server gui (http://localhost/zabbix/.)
The error says: Zabbix server is not running: the information displayed may not be current.
Any idea why is this happening ll of a sudden and out of the blue? I restarted the machine - which should automatically restore the zabbix server upon startup - but it's still not running.
I also researched for a startup or restart command but true to form with zabbix helpful, clear documentation is non-existent.
EDIT:
Some more info:
MySQL is running normally. I'm able to select, insert into, whatever I want.
Doing /etc/init.d/zabbix-server status results in * zabbix_server is not running
The last entry in zabbix_server.log is Zabbix Server stopped. Zabbix 2.2.9 (revision 52686).
Doing sudo /etc/init.d/zabbix-server start results in * Starting Zabbix server zabbix_server but the status is still not running and the log file doesn't have any new entries.
just get into the zabbix.conf.php
>$sudo vim /etc/zabbix/web/zabbix.conf.php
>$ZBX_SERVER = '**your zabbix ip address or DNS name**';
>$ZBX_SERVER_PORT = '10051';
>$ZBX_SERVER_NAME = '**your zabbix hostname**';
just change the ip address you can resolve the error
Zabbix server is not running: the information displayed may not be current
After that restart the zabbix server
>$sudo service zabbix-server restart
To verify go to Dashboard Administration -> queue there you see data
i resolved my error like this works fine for me.
To solve the problem zabbix server is not running you have to :
First - Check that all of the database parameters in zabbix.conf.php ( /etc/zabbix/web/zabbix.conf.php) and zabbix_server.conf ( /etc/zabbix/zabbix_server.conf) to be the same. Including:
• DBHost
• DBName
• DBUser
• DBPassword
Second- Change SElinux parameters:
#setsebool -P httpd_can_network_connect on
#setsebool -P httpd_can_connect_zabbix 1
#setsebool -P zabbix_can_network 1
After all, restart all services:
#service zabbix-server restart
#service httpd restart
worth a try.
Edit this file: sudo nano /etc/default/zabbix-server
Adjust the START property to yes:
START=yes
Then try to run Zabbix again: sudo service zabbix-server start
This may happen because of the old and new IP address
I have faced same issue which was solve by below method:
vim /etc/zabbix/web/zabbix.conf.php
$ZBX_SERVER = new ip address
then restart zabbix server
I was using a special character in my DB password - wrapping the DBPassword option in /etc/zabbix/zabbix_server.conf and doing sudo service zabbix-server restart got me back up and running.
Not Working
DBPassword=MyString?
Working
DBPassword='MyString?'
Solution might be this simple:
sudo su
nano /etc/zabbix/zabbix-server.conf
Remove "#" in front of DBPassword=YourPassword (will change from blue to grey)
Ctrl x (Y to save and press enter to exit)
service zabbix-server restart
Now you can refresh your browser running ZABBIX. If not, you will have to do the same steps for CacheSize=32M
You do not have to change anything in /etc/zabbix/web/zabbix.conf.php (localhost is fine)
When editing anything, remember "#" in front of line means invisible to linux.
As Zabbix Senior Instructor and Consultant Hernandes Martins says in his "Zabbix server is not running what to do?" blog post:
This is the first step that should be checked regardless of the situation, always view the logs, from the moment the error message appeared in the zabbix web interface always view the log.
By following his advice I could be able to identify the cause of the issue with my Zabbix server, and then apply the solution related to the specific problem.
In my case, as I've commented in the page:
The problem in my server was of "4. Resource Allocation Issues". Just like you wrote above, Zabbix was showing out of memory errors on the log when trying to start the server.
After increasing the value of parameter CacheSize I tried to restart the service, but it didn't respond. So, I ended up restarting the whole machine. Fortunately, in the end it resolved the problem for good.
So, take a look at the log with command tail -f /var/log/zabbix/zabbix_server.log on the terminal/prompt, watch for any errors, and tackle the problem according to what it makes sense for your particular case.
Looks like the problem was that I created a Database monitoring Item programmatically and it triggered a bug that caused the server to shutdown.
Once I deleted the item the server came back up, and creating subsequent Items didn't kill it.
The deadly Item had a value_type of Numeric unsigned, -1 programmatically, while the newly created Items have a value_type of float, which is 0 programmatically.
The whole thing has a voodoo element to it but it did solve my problem.
Maybe is configuration issue
nano /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix_db
DBUser=zabbix_user
DBPassword=XXXXXXX
works for me on Zabbix 3.0 Centos 7
The zabbix-server daemon doesn't seem to like passwords with special characters in them. Unsure whether quotes would work in the configuration I just removed special characters from the database password, updated the configuration files and restarted the daemon.
Configuration parsing errors don't show up in logs for some reason.
Install nmap (( # yum/apt-get install nmap ))tool and check to find out which port the zabbix is listenning to?(( # nmap -sT -p1-65535 localhost )) 10050 or 10051?
The result should be somthing like this:
Starting Nmap 6.40 ( http://nmap.org ) at 2016-11-01 22:54 IRST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00032s latency).
Other addresses for localhost (not scanned): 127.0.0.1
Not shown: 65530 closed ports
PORT STATE SERVICE
22/tcp open ssh
25/tcp open smtp
80/tcp open http
3306/tcp open mysql
10050/tcp open unknown <--- In my case this is it
Then open /etc/zabbix/web/zabbix.conf.php and check the line starting with: $ZBX_SERVER_PORT , it's value should be the same number you saw in the nmap scan result. Change it and restart zabbix-server and httpd and you are good to go!
There maybe IP address conflict, try host 'Zabbix server'
On RHEL/CentOS/OEL 6
Check that the firewall is allowing connection to Zabbix Server port which is 10051, as a user with root priv:
vi /etc/sysconfig/iptables
and add the following lines
-A INPUT -m state --state NEW -m tcp -p tcp --dport 10051 -j ACCEPT
restart iptables
# service iptables restart
If you have disabled IPV6, you need to also edit the hosts file and remove IPV6 line for "localhost"
# vi /etc/hosts
remove or comment out "#" the ipv6 line for localhost
::1 localhost6.localdomain6 localhost6
restart the zabbix-server and check if the error message is gone.
I was in the same trouble.
For my case, that was a conflict between /etc/zabbix/zabbix_agentd.conf and zabbix_server.conf parameters.
I adjusted
"DBHost=localhost",
"DBName=zabbix",
"DBUser=zabbix",
"DBPassword=******",
"DebugLevel=3"
"ListenPort".
If you run the default installation, you should keep ListenPort=10051 for the server and 10050 for the agent.
Cheers!
In my case it happens when introducing host with templates, graphs,trigger etc, the server falls.
The problem was that by default the cache is at 128k and you have to change it.
sudo nano /etc/zabbix/zabbix-server.conf
Uncheck # Sizecache and add 32M for example.
Cachesize=32M
restart service and voila!! server working
service zabbix-server start
My problem was caused by having external ip in $ZBX_SERVER setting.
I changed it to localhost instead so that ip was resolved internally,
$sudo nano /etc/zabbix/web/zabbix.conf.php
Changed
$ZBX_SERVER = 'external ip was written here';
to
$ZBX_SERVER = 'localhost';
then
$sudo service zabbix-server restart
Zabbix 3.4 on Ubuntu 14.04.3 LTS
I had the same issue.
I forgotten selinux conf, not all is ok:
setsebool -P httpd_can_connect_zabbix on
In my case, this occurred because the password in the server config file was commented out.
Open the server config file: # sudo vim /etc/zabbix/zabbix-server.conf
Scroll down to db user and below there will be the password with a # commenting out. Remove the hash and insert your DB password.
In my case i had to disable Linux SE
[root#webserverlocaldomain /]# setenforce 0
Disable Firewall
[root#webserverlocaldomain /]# systemctl stop firewalld
Edit config file uncommenting#
[root#webserverlocaldomain /]# vi /etc/zabbix/zabbix_server.conf
ListenPort=10051
DBHost=localhost
DBPassword=password
Then restart the services
[root#webserverlocaldomain /]# systemctl restart zabbix-server zabbix-agent httpd
#getsebool -a
//httpd_can_network_connect off
#setsebool httpd_can_network_connect on
#getsebool httpd_can_network_connect
#service zabbix-server restart
in my case after installing zabbix from sources (removed zabbix 4.0 because upgrading to 4.2 wasn't possible via apt on a Raspbian GNU/Linux 9.4 stretch) it loaded the config from /usr/local/etc/zabbix_server.conf instead from /etc/zabbix/zabbix_server.conf
After deleting /usr/local/etc/zabbix_server.conf and creating a symlink pointing to the correct config file in /etc/zabbix/zabbix_server.conf it started to work
I solved this problem on Ubuntu 18.04 by uninstalling Zabbix and reinstalling it again from scratch.
The initial installation didn't work because I had followed old posts/guides/tutorials, even from Zabbix documentation itself, so these might probably be outdated. So, the trick was to find and follow the most updated guide to Zabbix installation from its docs.
Here are the two links I followed for uninstalling and reinstalling Zabbix:
How to uninstall Zabbix: https://www.quora.com/How-do-I-uninstall-Zabbix-server-agent-in-Ubuntu
How to (properly) install Zabbix: https://www.zabbix.com/download?zabbix=4.0&os_distribution=ubuntu&os_version=18.04_bionic&db=postgresql
When installing Zabbix from the link above, your choosen Zabbix Version, OS Distribution, OS Version or Database may be different from the ones I've selected, but following the instructions on this page will probably be also the right way for you to install your chosen Zabbix configuration without getting errors post installation.
Never had the problem until it suddenly appeared once, for me, the solution was to add (uncomment) the following line in /etc/zabbix/zabbix_server.conf
ListenIP=0.0.0.0
i had similar problem and my gui reported problem with cache, i change it zabbix-server.conf to 32M and now is ok, zabbix is an intelligent tool, please if it possible check problems in gui first. I had to much hosts ... for default cache.

Change port # for mysql on mac

I just installed mysql on a mac running 10.6. The mysql version is 5.1.56. I need to have mysql run on port 3307. This article says we can change the port by modifying this file:
# vi /etc/my.cnf
http://www.cyberciti.biz/faq/change-default-mysql-port-under-linuxunix/
but there is no such file in /etc. I can see mysql is running ok because I can connect to it just fine, is the way we change the port # different now?
Thanks
Looks like the new installers are adding the port as 3307
To change that follow below steps
sudo vi /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
change 3307 from this line <string>--port=3307</string> to 3306
On OSX you can create /etc/my.cnf if it does not exist. You can base it on samples found in /usr/local/mysql/support-files. Don't forget to restart MySQL for your my.cnf to take effect.
On MacOs High Sierra running MySql v8 server, you need the following:
Edit /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
Under ProgramArguments, you will see many entries with
<string>...</string> etc,
Add the following line: <string>--port=16000</string>
Also, to restart you need to do the following:
launchctl unload -F /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
and then
launchctl load -F /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
I hope this helps.
By default, the install doesn't create a my.cnf file on Snow Leopard. You can create one yourself under /etc or you can copy one from /usr/local/mysql/support-files/
Then run :
sudo cp my-huge.cnf /etc/my.cnf
Check out the explanation here
I experienced a similar problem and here's what worked for me. If you installed MySQL using brew install mysql then this should work for you.
For context, I'm using macOS Monterey 12, Homebrew 3.4.5, and MySQL 8.0.
MySQL is installed in:
/opt/homebrew/Cellar/mysql/8.0.28_1/
The configuration file my.cnf is located at /opt/homebrew/etc.
You can change the default port by specifying a new port in the my.cnf file.
First navigate to the homebrew etc folder
cd /opt/homebrew/etc
Append the new port value to the my.cnf file
echo "port = 3307" >> my.cnf
restart the MySQL service
brew services restart mysql
I tried a long time to get mysql running on my Mac (OSX 10.11.13) with mysql 5.7.11 to develop wordpress sites on my local machine...
When I used the app duplicator to migrate a website to my local machine I got errors during the database import. This was caused by to stricked sql_mode...
The trick that made it was:
Going to
/usr/local/mysql-5.7.11/support-files/
and copy the content from my-default.cnf
and paste it to
/etc/my.cnf (if this file does not exist create it!)
at the very last line of my.cnf I added:
sql_mode="NO_ENGINE_SUBSTITUTION"
Et voilà: sql_mode is changed permanently!
Whoop whoop!
I installed docker and was having problems with my company wanting to use port 3306 (which is what I was using privately).
Similar problem to you. So this is what I did to fix it.
sudo vi /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
Then you get a long list of script tags and
Insert <string>--port=3307</string> into the array. Make sure you put it under the other strings and within the array.
I changed my port to 3307 instead of 3306 and now docker is working.