Mysql: How to see the compile time configs of a mysql binary - mysql

I installed mysql using apt-get on my local machine recently.
It proceeded with the default my.cnf.
I would like to see what are the compile time configurations of this binary.
Can some one help me how can i do this?

install mysql-server source.
apt-get source mysql-server # root access not needed
This will create some archive files in the current directory. In my debian lenny it creates the following directories. In your Ubuntu it'll be almost same.
mysql-dfsg-5.0-5.0.51a
mysql-dfsg-5.0_5.0.51a-24+lenny5.diff.gz
mysql-dfsg-5.0_5.0.51a-24+lenny5.dsc
mysql-dfsg-5.0_5.0.51a.orig.tar.gz
Now inspect the debian/rules file in extracted source. I did it by this,
less mysql-dfsg-5.0-5.0.51a/debian/rules
You can use other editor (nano, vi, gedit all are okay). Arround line 68 you'll see the configuration option
To know more about how to recompile a debian source package, read
Howto recompile debian packages
Compiling Debian or Ubuntu Source Packages

Try to use this:
shell> mysql_config

grep CONFIG $(which mysqlbug)
Source

Related

Installing MySQL and MySQLWorkbench In Offline Red Hat 7 Machine

I am trying to install mysql workbench on a system without network. I downloaded the mysql-workbench-community, mysql-community-{server, client, common, libs} which were noted in the "Installing RPM Packages" section of MySQL Install Manual. It states that these are the standard rpm packages needed for a basic functional install of mysql community. So with that I downloaded all the rpm packages and attempted to manually install each using:
sudo rpm -ivh mysql-community-package-name.rpm
Unfortunately I keep getting dependency errors. I found this link to obtain all the dependencies for a package. So on my second attempt I ran the following:
Repoquery -R --resolve --recursive mysql-community-server | xargs -r yumdownloader
Which gave me about 100 rpm packages. I transferred them onto my machine and unfortunately more dependencies like mysql-connectors-community and mysql-=tools-community came up which were never documented or mentioned as dependencies with the script.
What am i doing wrong? Is there a way to download all the rpms and bundle them together as a custom RPM in the future? I see ubuntu has a apt-offline command mentioned here. Is there a similar method I can apply for redhat?
Update1:
I have an idea to create a container rhel7 instance, mounting /root/tmpkg and running this example. But is there another way I should consider?

Why can't I uninstall mysql-5.5 & install mysql-5.6 on Amazon Linux machine?

I'm on a 64-bit Amazon Linux machine.
I had previously installed mysql-server 5.5. (using sudo yum install)
However, I soon found out that my application requires MySql-serve 5.6.
So I uninstalled mysql-server 5.5. (using sudo yum remove mysql-server) and now I'm following these instruction to install mysql-server 5.6.
But I'm running into a problem.
when I try to do the second install, I get the following 2 errors:
file /usr/lib64/mysql/libmysqlclient.so.18 from install of mysql-community-libs-5.6.14-3.el6.x86_64 conflicts with file from package mysql55-libs-5.5.46-1.10.amzn1.x86_64
file /etc/my.cnf from install of mysql-community-server-5.6.14-3.el6.x86_64 conflicts with file from package mysql-config-5.5.46-1.10.amzn1.x86_64
Why on earth am I getting these two errors? How do I fix them?
I removed mysql-server-5.5, so why is it conflicting with 5.6?
I did ls on /etc/my.cnf and /usr/lib64/mysql/libmysqlclient.so.18 and the files don't even exist!! If the files don't exist how can they be conflicting with other files?? Who can help explain this?
PS, I tried #msknapp's explanation here: Can't install MySQL 5.6 by RPM, however I don't know what to do after step #1 to install the rpm. I think that step is left unstated.
mysql-server (of whatever version) depends on other packages ( in your case mysql-community-libs mysql-community-server)
When it is installed in the first place with the old version this stuff is installed. When you "uninstall" mysql-server these dependencies are NOT removed.
When you try and install the new version these still existing packages will conflict with the new package. It does not matter if the actual files in the package are there, it is the package and it's listing of what to expect that conflicts.
To resolve your problem figure out what the dependencies of mysql-server were and uninstall them before attemping the install.
This answer https://superuser.com/questions/294662/how-to-get-list-of-dependencies-of-non-installed-rpm-package may be of interest for working out what mysql-server depends on

How to give java path in ubuntu

I am facing problem setting up java path while installing mysql database in my ubuntu PC. The procedure shows the following and i hav no idea for setting the java path
Error: /usr/lib/jvm/java-1.7.0-openjdk-amd64/bin/java not found or not a valid JDK
Type the full pathname of a JDK installation (or Ctrl-C to quit), the path will be stored in /home/devkrishna/.sqldeveloper/4.1.0/product.conf
/usr/lib/jvm/java-1.8.0-openjdk-amd64
Error: Java home /usr/lib/jvm/java-1.8.0-openjdk-amd64/bin/java is not a JDK.
Running SQL Developer under a JRE is not supported.
If this Java VM is actually a full JDK installation, add
'SetSkipJ2SDKCheck true' to one of the following files.
Otherwise specify a different Java JDK location with a
SetJavaHome directive in one of the following files:
/home/devkrishna/.sqldeveloper/4.1.0/product.conf
/opt/sqldeveloper/sqldeveloper/bin/sqldeveloper.conf
Open terminal (Ctrl+Alt+t)
Type
sudo gedit .bashrc
Enter password of ubuntu user
Go to last line of the file
Type below code in new line
export JAVA_HOME=enter_java_path_here
export PATH=$JAVA_HOME/bin:$PATH
eg: export JAVA_HOME=/home/pranav/jdk1.8.0_131
export PATH=$JAVA_HOME/bin:$PATH
Save the file
Type
source ~/.bashrc
in terminal
Done
The first error looks like you don't have openjdk-7 for some reason it looks like it is also looking for openjdk-8. Install at-least one of them with :
sudo apt-get install openjdk-7-jdk
and/or
sudo apt-get install openjdk-8-jdk

Can we install MySQL different versions on Linux CentOS5.8?

I am trying to install a software which required MySQL-server, MySQL-client installed on the server so now I want to install MySQL-server and MySQL-client using rpm files "MySQL-server-5.5.17-1.rhel5.x86_64.rpm" and "MySQL-client-5.5.17-1.rhel5.x86_64.rpm".
I have installed MySQL-client but when I try to run mysql-server
*rpm -i MySQL-server-5.5.17-1.rhel5.x86_64.rpm*
it's showing error:
*error: Failed dependencies:
MySQL conflict with mysql-5.0.77-4.el5_6.6.x86_64
MySQL conflict with mysql-5.0.77-4.el5_6.6.i386
MySQL conflict with mysql-server-5.0.77-4.el5_6.6.x86_64*
So how can i solve this problem?
the error given by you *error: Failed dependencies:
MySQL conflict with mysql-5.0.77-4.el5_6.6.x86_64
MySQL conflict with mysql-5.0.77-4.el5_6.6.i386
MySQL conflict with mysql-server-5.0.77-4.el5_6.6.x86_64*
It clear show that the machine you are going to install mysql 5.5 rpm have mysql 5.0.77 installed .
to resolve this problem .
1. you take backup of datadir and my.cnf (if you are using mysql 5.0 db server earlier).
2. remove all mysql 5.0 server packages , to remove these package you should knew what are the packages already installed on machine
to view all mysql package already installed use rpm -qa | grep -i "mysql*" this command show what package is already installed on machine
now you have to remove all package which name shows in above command.
to remove a package/rpm use rpm -e mysql-5.0.** if show error then use
rpm -e --nodeps mysql-5.0.**
we have to remove all packages one by one by using rpm -e .
after successful remove all older version of mysql , now start installation of mysql-5.5*** packages by using rpm -ivh mysql-5.5***.rpm.
First question - is the version of MySQL already installed actually in use or was it simply there as a result of a fresh CentOS install? If the former, try upgrading rather than installing. If the latter, uninstall the old version (possibly using the --no-deps option on rpm) and then install the newer version
Next, are you trying to replace MySQL or install another version alongside it?
If the former, again try upgrading rather than installing. If that's not possible, you're going to have to remove the older version and then install the new version
If the latter, and if it is possible, look at the --prefix and --relocate options in RPM.as they may help.
If you do to mange to get it installed side by side with an older, you'll have fun and games ensuring that the relevant versions are pointing to the correct libraries and that you don't get any corruption between them. Also, you will need to run them so that they listen on separate ports with separate database folders, PID and socket files etc.
Whatever you need to do, do it out of business hours with as many backups as you can do

set up MySQL with MAMP for Ruby

I'm trying to use Ruby with the MySQL that comes with MAMP, but there is a problem with the headers not being installed (or something like that).
Someone referred me to the tutorial copied below but I can't get it to work. When I put in the first line ./configure... it says no such directory.
1) One question in particular is, it says, "copy the MySQL source file (mysql-5.1.37.tar.gz) to somewhere on your hard drive." I don't know if by installing MAMP I have already done this step or not. If not, then I don't know what to do.
2) I also don't know what it means when it says "untar" the source file and "cd"...If MAMP is installed, has it been untarred already?
3) Also, do would I just open the terminal and start this code, or do I have to go into Mysql?
I wonder if anyone can tell me how to adapt it. Here are 2 other pieces of information about my installation that might be helpful.
a). MySQL is set up on port 8889 on my computer.
b) Also when I enter "which mysql" in the command line, it responds with "/usr/local/mysql/bin/mysql."
Please help if you can. Thanks.
Download the latest MAMP dmg file.
Download the 1.8.2 (or whichever the latest one you could find) components file from this page.
Unzip, mount the dmg, then copy the MySQL source file (mysql-5.1.37.tar.gz) to somewhere on your hard drive.
Untar the MySQL source file, and `cd` to the source file directory.
Compile the library:
$ ./configure --with-unix-socket-path=/Applications/MAMP/tmp/mysql/mysql.sock --without-server --prefix=/Applications/MAMP/Library
$ make -j2
Copy the compiled libraries into MAMP:
$ cp libmysql/.libs/*.dylib /Applications/MAMP/Library/lib/mysql
Copy the MYSQL headers into MAMP:
$ mkdir /Applications/MAMP/Library/include
$ cp -R include /Applications/MAMP/Library/include/mysql
Install the Ruby MySQL Gem, on Snow Leopard:
$ sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/Applications/MAMP/Library/bin/mysql_config
On Leopard:
$ sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/Applications/MAMP/Library/bin/mysql_config
Enjoy!
EDIT # 2009-11-23: If you’re still experiencing problems (perhaps with RVM), try adding “/Applications/MAMP/Library/bin/” to your $PATH in “~/.bash_profile”.
You should probably follow the tutorial in this link. It is updated for MAMP 1.9.5 with mysql2. A couple of changes have been made to the new MAMP version.
http://blog.mirotin.net/?p=35
Furthermore the tar file you need can be found at this link. Download the MAMP_components_1.9.5.dmg file.
http://sourceforge.net/projects/mamp/files/mamp/1.9.5/
Finally got through this with this blog post: http://newfangled.me/installing-mamp-and-rails-on-a-mac/
Here's the archived version of that incase it goes offline http://web.archive.org/web/20130728130916/http://newfangled.me/installing-mamp-and-rails-on-a-mac
The other answer's reference 404s for me. http://blog.mirotin.net/?p=35
I'd been struggling with this for a while myself.