I downloaded mysql for my Mac from official website 'mysql.com', then launched it on my server using preferences pane and as well as from command line using
sudo /usr/local/etc/mysql/support-files/mysql.server start
Its working good, but during my development process i want to change the sql_mode,because i am getting below error
sql_mode=only_full_group_by
Many of them said to change sql mode config in /usr/mysql/my.cnf, but unfortunately i don't see that directory on my mac, So i installed Homebrew version mysql ,this also not working.
My Problem is where I can find my.cnf file on my mac? now i am not using homebrew version of mysql, I'm using official mysql downloaded from mysql.com/downloads.
Run mysql --help it will show you the config file that is being loaded.
Finally i got solution, i created new file inside /etc called my.cnf and set this as
[mysqld]
# Default : STRICT_TRANS_TABLES,ONLY_FULL_GROUP_BY,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
sql_mode = ""
Now its working great :) Thanks for your responses!
Related
Having trouble with the testlink installation. At the beginning of the installation it's giving me a warning saying:
"Failed! MySQL Database cannot be used." and after I try to install it shows me this "Checking PHP DB extensions Warning!: Your PHP installation don't have the mysql extension mysql- without it is IMPOSSIBLE to use Testlink.Failed!".
I installed Xampp before this, so I should have MySql, right? If it matters, I had to switch the Apache port numbers to 8080.
Image 1:
Image 2:
]
I faced similar issue, tried all given answers on different forums, but nothing worked for me unless I downgraded the version of Xampp to 32 bit installer version 5.6.36. Link which simply solved the problem.
As per my understanding issue is testlink [mysql] is not compatible with the latest version of PHP.
I followed this article to install but here also people faced similar issue as you can see comment section and there is no response from author on same. Rest of the article was very helpful.
I solved this issue configuring the extensions for SQL in file xampp's php.ini
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_pdo_mysql.dll
DLLs should be in the path of the xampp installation, in my case C:\xampp\php\ext\**
Click config then click PHP (php.ini) and add then following three lines
extension=php_mssql.dll
extension=php_mysql.dll
extension=php_mysqli.dll
https://forum.testlink.org/viewtopic.php?t=2935
htis help me to fix it
Some versions of PHP are not compatible with MySQL. Try reinstalling PHP using version 5.6
I recently uninstalled and reinstalled MySQL (on Windows 7) using the installer. When I try to set up the MySQL Server, it won't let me continue unless I enter the "current" root password??? I don't understand how there can be a current root password if I completely uninstalled and reinstalled the program.
I've tried with a blank password as well as every password I can possibly think of that I would have used and nothing works. Google is completely unhelpful as every result I've found either refers to a "homebrew" installation, whatever that is, or refers to installations on Linux. Is there some folder of config files that the uninstallation refuses to delete that I need to remove manually? Or am I missing something else?
After uninstallation process, please check following directories if it exists and remove:
C:\Program Files\MySQL
C:\Program Files (x86)\MySQL
C:\ProgramData\MySQL
C:\Users[User-Name]\AppData\Roaming\MySQL
PS: Please keep in mind that If you have multiple MySql Instances installed on your workstation, you need to go into each directory and delete only the relevant instance.
I too faced the same issue but the following worked for me:
Go to Control Panel >> Programs >> Programs and Features, select MySQL Server and click Uninstall.
Also uninstall the MySQL workbench, MySQL Installer Community, MySQL Router.
Then delete the files:
C:\Program Files\MySQL
C:\Program Files (x86)\MySQL
C:\ProgramData\MySQL
C:\Users\[User-Name]\AppData\Roaming\MySQL
Finally restart your system and install MySQL again.
In a fresh development machine, after installing MySQl 8.0.18 in Windows 10 64 bit, I hit this error and could not connect to MySql.
Nothing else worked.
Then I uninstalled the Mysql and deleted C:\Program Files\MySQL and retried installing MySql 8.0.18 and while re-installing it asked to specify root user password.
After specifying the root password, I was able to connect.
I was also facing the same problem, i tried the same process and this works for me too. Also i uninstalled my MySQL installer, MySQL shell, MySQL workbench, MySQL server and all connectors and routers from my Control Panel>>Uninstall a program and after deleting everything. I tried this solution install MySQL again from the oracle website and everything worked fine.
when I was facing the same issue, I used "password" for root password, which is default for MySql.
I am using wamp wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b mysql version is 5.6.17. It provides mysql and php servers.
I want to track (see) the queries recently executed (from anywhere i.e a web page, desktop app or any service using mysql on mysqlserver.
I know "what to do" = > i have to enable query logging as told by http://dev.mysql.com/doc/refman/5.6/en/query-log.html
But i dont know "how to do" though i have seen How to enable MySQL Query Log?
but i am unable to find my.cnf anywhere. What i have is my.ini in wamp\bin\mysql\mysql5.6.17
As i use wamp so I am not familiar with mysql console. I want to know how (where) to set
general_log_file=/path/to/query.log
Using the WAMPServer menu system edit the my.ini file. WAMPServer uses a my.ini and not a my.cnf
(left click wampmanager) wampmanager->MySQL->my.ini
This will open the correct my.ini file with notepad.
Check for these parameters and if they dont exists add them under the section heading [wampmysqld] or if you are using 64bit WAMPServer the [wampmysqld64]
NOTE: If you are using the 64bit WAMPServer you may have to change [wampmysqld] to [wampmysqld64] as the 64bit release had a little bug in it and this section header was not set correctly. The filename may also be c:\wamp64 on 64bit WAMPServer systems.
log-output = FILE
general_log = 1
general_log_file=C:/wamp/logs/general-query.log
Save the file and then restart MySQL Server (restart WAMP in your case)
Check in the C:\wamp\logs folder for the new general-query.log file.
If 64bit version, be sure the log will be created in
"C:/wamp64/logs/general-query.log"
instead of "C:/wamp/logs/general-query.log".
I tried to use MAMP Pro to replace previous XAMPP on my Mac due to its easy Virtual Hosts management. However after I installed it. The MAMP, basic version works, but the Pro version keeps given me this error message:
The MySQL configuration file my.cnf couldn't be written.
I googled for a while and there are some different solutions, like create my.cnf on /etc/, but none of these works. Also the error log is empty.
Has someone encountered this before? Or does anyone have a clue how could I solve this problem? Thank you!
I just purchased MAMP PRO and I'm having this error as well. Here's what "fixed" it:
Open Terminal and type in sudo killall -9 mysqld. You might see "No matching processes belonging to you were found," which is fine, it means that MySQL was not running.
Now, in Applications, look for the regular MAMP folder. Open MAMP here and click Start Servers
Now open MAMP PRO and the servers should be started
This is just a work-around, it definitely should not require these. At the very least, this should get you up and running.
Contacting support!
File -> Reset to Factory Settings
Possibly a permissions issue, but I wasn't able to resolve it. The above fixed it for me.
uninstall mamp.
remove all files about mamp.
reinstall mamp.
I removed 'my.cnf' from '/etc' directory. Restarted MAMP pro. Started server successfully.....
Your configuration may be wrong.
exp.
sql_mode = STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION # success
or
sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' # error
All,
For all of this I am using Mac OSX Snow Leopard.
I have happily used XAMPP to develop PHP backed sites in the past with no problems(as you'd expect for such a simple to set up package). I am now trying to set up this MySQL install in Netbeans 6.8 (for now just trying to get a sample database backed webapp to run). My issue is that even though MySQL has been started I cannot connect to it at 127.0.0.1 on port 3306 (which it is set up to use).
I have read that the issue is that XAMPP holds MySQl.sock in /Applications/XAMPP/xamppfiles/... whereas MySQL Workbench and Netbeans expects to find it in /tmp/MySQL.sock. Is this correct? I've tried to set up a symbolic link from /tmp to the xmapp directory but this doesn't appear to have changed anything.
Is there anything else I can try/anything that I am missing?
I upgraded from an older version of XAMPP to 1.7.3 and encountered a the same problem, I got MySQL Workbench to connect if I edited the my.ini file and:
changed the socket parameter to:
socket = "TCP/IP"
made mysql bind to an IP address or all IP as in the case below:
enable-named-pipe
bind-address=0.0.0.0
This requires that you disable named-pipe (as shown above)
I could not get this to work. So in case anyone else is reading this and wondering what happened... I installed a non XAMPP instance of the MySQL database and am using that now instead. Less than ideal but it works.