[CMake] unistall a mysql src with CMake

Leif Walsh leif.walsh at gmail.com
Fri Nov 16 12:05:27 EST 2012


Try make uninstall. It should use install_manifest.txt to find what's installed. 

Sent from my iPhone

On Nov 16, 2012, at 11:58, Érico <ericomtx at gmail.com> wrote:

> I have followed the steps from bellow to install mysql from src on my linux ( red hat 6 ) : 
> 
> shell> groupadd mysql
> shell> useradd -r -g mysql mysql
> # Beginning of source-build specific instructions
> shell> tar zxvf mysql-VERSION.tar.gz
> shell> cd mysql-VERSION
> shell> cmake .
> shell> make
> shell> make install
> 
> all these as root 
> 
> the point is that it did not install into /usr/local but into /usr/share 
> 
> 
> these worked fine : 
> # Postinstallation setup
> shell> cd /usr/local/mysql
> shell> chown -R mysql .
> shell> chgrp -R mysql .
> 
> 
> but I can not create the DB or start the server : 
> 
> 
> 1. [root at ericomtx bin]# pwd
> /usr/bin
> [root at ericomtx bin]# ls -la mysql*
> -rwxr-xr-x. 1 root root 4984411 Nov 15 13:26 mysql
> -rwxr-xr-x. 1 root root  110776 Nov 15 13:24 mysqlaccess
> -rwxr-xr-x. 1 root root    1702 Apr  9  2010 mysqlaccess.conf
> -rwxr-xr-x. 1 root root 4290406 Nov 15 13:26 mysqladmin
> -rwxr-xr-x. 1 root root 4841390 Nov 15 13:26 mysqlbinlog
> -rwxr-xr-x. 1 root root   10349 Nov 15 13:24 mysqlbug
> -rwxr-xr-x. 1 root root 4281034 Nov 15 13:26 mysqlcheck
> -rwxr-xr-x. 1 root root 4994249 Nov 15 13:26 mysql_client_test
> -rwxr-xr-x. 1 root root    6456 Nov 15 13:24 mysql_config
> -rwxr-xr-x. 1 root root    4169 Nov 15 13:24 mysql_convert_table_format
> -rwxr-xr-x. 1 root root   22389 Nov 15 13:24 mysqld_multi
> -rwxr-xr-x. 1 root root   21432 Nov 15 13:24 mysqld_safe
> -rwxr-xr-x. 1 root root 4473050 Nov 15 13:26 mysqldump
> -rwxr-xr-x. 1 root root    6602 Nov 15 13:24 mysqldumpslow
> -rwxr-xr-x. 1 root root    3245 Nov 15 13:24 mysql_find_rows
> -rwxr-xr-x. 1 root root     483 Nov 15 13:24 mysql_fix_extensions
> -rwxr-xr-x. 1 root root   32209 Nov 15 13:24 mysqlhotcopy
> -rwxr-xr-x. 1 root root 4287853 Nov 15 13:26 mysqlimport
> -rwxr-xr-x. 1 root root   14472 Nov 15 13:24 mysql_install_db
> -rwxr-xr-x. 1 root root    7694 Nov 15 13:24 mysql_secure_installation
> -rwxr-xr-x. 1 root root   16689 Nov 15 13:24 mysql_setpermission
> -rwxr-xr-x. 1 root root 4278732 Nov 15 13:26 mysqlshow
> -rwxr-xr-x. 1 root root 4331143 Nov 15 13:26 mysqlslap
> -rwxr-xr-x. 1 root root 4845542 Nov 15 13:26 mysqltest
> -rwxr-xr-x. 1 root root  729588 Nov 15 13:26 mysql_tzinfo_to_sql
> -rwxr-xr-x. 1 root root 1017021 Nov 15 13:26 mysql_upgrade
> -rwxr-xr-x. 1 root root  888746 Nov 15 13:26 mysql_waitpid
> -rwxr-xr-x. 1 root root    3818 Nov 15 13:24 mysql_zap
> 
> 
> [root at ericomtx bin]# ./mysql_install_db --user =mysql
> 
> 
> 121116 14:50:18 [ERROR] Column count of mysql.proc is wrong. Expected 20, found 16. Created with MySQL 50080, now running 50504. Please use mysql_upgrade to fix this error.
> ERROR: 1558  Column count of mysql.proc is wrong. Expected 20, found 16. Created with MySQL 50080, now running 50504. Please use mysql_upgrade to fix this error.
> 121116 14:50:18 [ERROR] Aborting
> 
> but I CAN NOT update MySQL ... it doesn allow me to : 
> 
> 
> [root at ericomtx bin]# ./mysql_upgrade 
> Looking for 'mysql' as: ./mysql
> Looking for 'mysqlcheck' as: ./mysqlcheck
> Running 'mysqlcheck with default connection arguments
> ./mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) when trying to connect
> FATAL ERROR: Upgrade failed
> [root at ericomtx bin]#
> 
> 
> .... also ... you may say to me so I need to create the DB from my install dir ... ok : 
> 
> [root at ericomtx mysql-5.5.4-m3]# scripts/mysql_install_db --user=mysql
> WARNING: The host '' could not be looked up with resolveip.
> This probably means that your libc libraries are not 100 % compatible
> with this binary MySQL version. The MySQL daemon, mysqld, should work
> normally with the exception that host name resolving will not work.
> This means that you should use IP addresses instead of hostnames
> when specifying MySQL privileges !
> Installing MySQL system tables...
> 121116 14:53:47 [Note] Buffered information: Performance schema disabled (reason: start parameters).
> 
> 121116 14:53:47 [ERROR] Column count of mysql.proc is wrong. Expected 20, found 16. Created with MySQL 50080, now running 50504. Please use mysql_upgrade to fix this error.
> ERROR: 1558  Column count of mysql.proc is wrong. Expected 20, found 16. Created with MySQL 50080, now running 50504. Please use mysql_upgrade to fix this error.
> 121116 14:53:47 [ERROR] Aborting
> 
> 121116 14:53:47 [Note] /usr/sbin/mysqld: Shutdown complete
> 
> 
> Installation of system tables failed!  Examine the logs in
> /var/lib/mysql for more information.
> 
> You can try to start the mysqld daemon with:
> 
>     shell> /usr/sbin/mysqld --skip-grant &
> 
> and use the command line tool /usr/bin/mysql
> to connect to the mysql database and look at the grant tables:
> 
>     shell> /usr/bin/mysql -u root mysql
>     mysql> show tables
> 
> Try 'mysqld --help' if you have problems with paths.  Using --log
> gives you a log in /var/lib/mysql that may be helpful.
> 
> Please consult the MySQL manual section
> 'Problems running mysql_install_db', and the manual section that
> describes problems on your OS.  Another information source are the
> MySQL email archives available at http://lists.mysql.com/.
> 
> Please check all of the above before mailing us!  And remember, if
> you do mail us, you MUST use the /usr/bin/mysqlbug script!
> 
> ......
> 
> I wanted to uninstall it ... and install it back with the correct source flags now .... 
> 
> How can I run cmake to unistall this ... ? I still have the uncompressed dir from the the installation : 
> 
> [root at ericomtx mysql-5.5.4-m3]# ls 
> aclocal.m4   CMakeCache.txt       config.guess     configure.in             depcomp               install-sh          libservices      man         pstack     sql-common     vio
> BUILD        CMakeFiles           config.h.cmake   COPYING                  Docs                  INSTALL-SOURCE      ltmain.sh        missing     README     storage        win
> BUILD-CMAKE  cmake_install.cmake  config.sub       CPackConfig.cmake        EXCEPTIONS-CLIENT     INSTALL-WIN-SOURCE  make_dist.cmake  mysql-test  regex      strings        ylwrap
> ChangeLog    CMakeLists.txt       configure        CPackSourceConfig.cmake  extra                 libmysql            Makefile         mysys       scripts    support-files  zlib
> client       cmd-line-utils       configure.am     CTestTestfile.cmake      include               libmysqld           Makefile.am      netware     sql        tests
> cmake        config               configure.cmake  dbug                     install_manifest.txt  libmysql_r          Makefile.in      plugin      sql-bench  unittest
> 
> 
> 
> 
> --
> 
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20121116/3b699cdb/attachment.htm>


More information about the CMake mailing list