Install mySQL on Redhat specifying a different location - mysql

I need to put the datafiles for mySQL 5.5 community server on a different location than the default (it would be helpful if the log could go there too). Is this something I can do at the command line or after install.
This is on Redhat

It looks the only way to do this is by building from source and specifying the home during Make. I would put down instructions but I am having a devil of a time getting it to build.

Related

Executable trying to connect to wrong MySQL socket file location

I have a set of executables (specifically BOINC server executables, but I don't think it matters) that I am trying to run on an Ubuntu 16.04 system. These executables were built on a different machine and use a version of the MySQL client library that was built on a RHEL 6.6 box (the release plan is to build everything on the RHEL 6.6 box and deploy it together, but the current executables were not built there).
The RHEL 6.6 box is configured to put its MySQL socket file at /var/lib/mysql/mysql.sock.
The Ubuntu 16.04 box is configured to put its MySQL socket file at /var/run/mysqld/mysqld.sock.
When I try to run one of the executables that connects to the database on the Ubuntu 16.04 box, I get the following error:
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
The error comes straight out of the mysql_real_connect function. Only these executables give me that error. The mysql commend works fine. mysql_config --socket returns /var/run/mysqld/mysqld.sock, just as I expect it to.
I have tried all the suggestions I could find about editing the config files. I have added both a ~/.my.cnf file and a /etc/mysql/mysql.conf.d/client_socket.cnf file that specify the socket file location in a [client] section, per all the other sources for dealing with socket file locations. None of it changed the behavior of the executables; they always look for /var/lib/mysql/mysql.sock as if something were hard-coded to do it. I can't find anything that is, though.
I have been beating my head against this problem for a while, and I cannot figure out what is going on. I ended up opening up the permissions on /var/lib/mysql and symlinking the real socket file to the expected location, but that feels like a hack. What is going on here? Why are my executables seemingly ignoring all MySQL system configuration? What is the proper way to fix this? Could this actually be hard-coded somewhere?
I just searched the BOINC source tree and tend to think that it is not hard code in the literal sense of the word but it is fixed at compilation time. See
https://github.com/BOINC/boinc/search?utf8=%E2%9C%93&q=mysql&type=
The proper fix to me is to either compile the BOINC source tree yourself on your machine, to use the cloud images prepared by the BOINC developers https://boinc.berkeley.edu/trac/wiki/CloudServer or to look at the instructions on wiki.debian.org/BOINC, of which I am unsure about how well this adapts to Ubuntu.

how to get most recent mySQLdump tool

Perhaps not really a suitable SO question but I'll give it a try.
When I try to dump my DB from the remote server, my MySQL workbench for MacOS tells me:
Applications/MySQLWorkbench.app/Contents/MacOS/mysqldump is version 5.7.12, but the MySQL Server to be dumped has version 5.7.15.
Because the version of mysqldump is older than the server, some features may not be backed up properly.
It is recommended you upgrade your local MySQL client programs, including mysqldump, to a version equal to or newer than that of the target server.
The path to the dump tool must then be set in Preferences -> Administrator -> Path to mysqldump Tool:
I have version 6.3 installed, and the built-in "check for updates" only tells me I already have the latest version.
Does anyone know where I can go to download this more recent dump tool? I looked around on the MySQL.com but couldn't find it.
There's a simple way to solve your problem.
Just go on google type: mysqldump 5.7.20 (this number is the version are you looking for, in my case is 5.7.20)
choose the link site from https://dev.mysql.com/downloads/mysql/
on that page scroll down until you see a list of avaible downloads, choose your operating system (in my case is Windows) then... download the zip that has the version you are looking for.
unzip that folder... go to bin inside it... from there copy mysqldump and paste it into your MySQLWorkbench folder... (replacing the one is in there)
restart your MySQLWorkbench... and that is all.
You just need to update the mysqldump.exe.The up to date version of the exe can be found in. To solve the issue just go to Edit->Preferences->Administrator ,and browse the following path
for example C:\Program Files\MySQL\MySQL Workbench CE 5.2.47\mysqldump.exe
If for some reason you have two separate installations of the SQL server, you might be pointing to the wrong sqldump.

Issue with MySQL Server

My problem is that windows services don't have MySQL Server. How to run it?
I need to run MySQL Server on a new for me laptop. There's Windows 7. And MySQL have been installed on it. In order to verify this, I opened the Programs and Features window and saw it there:
But when I go to the Services to run it, I don't find it. It's absent there:
It's very strange for me. Why MySQL is not among the services? How can I run it? It's installed on this station.
Try performing the following steps and then check again.
Start Command Prompt (cmd)
Go to the "C:\Program Files\MySQL\MySQL Server 5.6\bin"
type mysqld --install
In my case I installed it through XAMPP so I do not have it among windows services (it has it´s own control panel), but I found this document that may help you solve this problem:
https://dev.mysql.com/doc/refman/5.1/en/windows-start-service.html
Also check the error log file which shows specific information about the start and stop of the service. In my case is called mysql_error.log and it is located under the '...mysql\data\' folder. Another document talking about that:
https://dev.mysql.com/doc/refman/5.7/en/error-log.html

MySQL Server start permission denied

I am a a newbie to database programming and I want to try out MySQL.
I just installed MySQL from the official website, I am running mac 10.8.2.
Anyways, whenever I try to run a simple command like $>mysql.server start
it says Permission denied.
I am able to open it through sudo but I would love to get this fixed as this is annoying me, that it wont work properly. I have been searching for the last two hours without finding a fix, so I was hoping anyone could give me a helping hand.
The easiest way is to install the MySQL Startup Item. Then you get a Preference pane for MySQL.
See http://dev.mysql.com/doc/refman/5.5/en/macosx-installation-startupitem.html for full instructions.
Re your comment:
It's often required for services like mysql.server need to run as a uid other than your user login. For instance, the MySQL data directory may only be writeable by the mysql uid. So starting such a service must be done from a user that can change the uid of the process. The root uid can do that, so it's necessary to use sudo to launch service processes like mysql.server.
TL;DR: YOU HAVE TO USE SUDO.
If you a absolute newbie to MYSQL and you just want to use the MYSQL server to test your code on you local MAC I would advice you to take a look at XAMPP / MAMP. Xampp offers a complete out of the box install for everything you need for a development servers (Apache server, MySQL, PHP, etc). Note, that I XAMPP / MAMP is not suitable for production server setting.
I personally use the XAMPP Windows version. I haven't tried MAMP but I have come across it many times . The XAMPP for Mac version seem not to have been update for a while so I suggest you give MAMP a try.
You could of course try to get your current install to work but that might require some work. Also with regard to firewall / security issues. With the out of the box version you will have to do a lot less. Why reinvent the wheel if you can easily install a out of the box version.

Where can I find MySql 4.0.30 for windows?

I need to adapt our testing server to our production one that is stored on Aruba.
Aruba use MySql 4.0.30 but I can't find them nowhere!
Anybody know where can I find it ? or anybody has the installer stored anywhere?
Davide
According to http://lists.mysql.com/mysql/210800 (an email from a MySQL employee) this is a non-public release for customers who are too inflexible to upgrade. It says you can pay for "extended support" to get it.
Here for you source: http://mirror.provenscaling.com/mysql/community/source/4.0/mysql-4.0.30.tar.gz
Binaries only there for 4.1: http://mirror.provenscaling.com/mysql/community/binaries/4.1/
MySQL does not require much installation steps like most windows software.
Just copy the mysql dir and the mysql data dir from the production environment to your local machine and start mysqld.exe (does not need to be run as a service) from the bin directory with:
mysqld.exe --defaults-file="C:\path\to\my.ini" MySQL
If it does not start, you most likely tweak some path entries in your my.ini.
Or you can install the latest 4.x Server you find and replace the binaries and data files with the ones you get from production. That should totally do it.