0
(0)

آیا نسخه قدیمی 5.1 MySQL را در cPanel خود دارید؟ cPanel نسخه 5.5 MySQL را ارائه می‌دهد و اگر فکر می‌کنید پایگاه‌های داده شما با MySQL 5.5 سازگار هستند، می‌توانید از روش‌های زیر برای ارتقاء نسخه MySQL در cPanel استفاده کنید.

این اسکریپت “/scripts/check_cpanel_rpms” در cPanel مشکلات RPM را بررسی و رفع می‌کند. هنگام اجرا، RPM‌های سازگار با cPanel نصب شده را با RPM اصلی cPanel که در “/var/cpanel/cpanel.config” قرار دارد بررسی و مقایسه می‌کند. بیایید با این اسکریپت یک ترفند ساده برای ارتقاء MySQL انجام دهیم.

ارتقاء MySQL در cPanel – روش آسان

توجه: این یک روش امن است که من پیدا کرده و با موفقیت تست کرده‌ام. اما باز هم پشتیبان‌گیری کنید و آن را با مسئولیت خودتان اجرا کنید.

روش ساده است. در فایل پیکربندی اصلی cPanel، نسخه MySQL باید به عنوان 5.1 مشخص شده باشد (mysql-version=5.1). بیایید آن را به 5.5 تغییر دهیم و “/scripts/check_cpanel_rpms –fix” را اجرا کنیم، بنابراین اسکریپت فایل پیکربندی cPanel را بررسی می‌کند و متوجه می‌شود که بسته‌های 5.5 نصب نشده‌اند. بسته‌های قدیمی 5.1 را حذف کرده و 5.5 را نصب خواهد کرد.

لطفاً مراحل و لاگ‌ها را در زیر ببینید.

نسخه و اطلاعات MySQL را مشاهده کنید.

root# /scripts/check_cpanel_rpms --fix
[20131110.094525]
[20131110.094525] Problems were detected with cPanel-provided files which are RPM controlled.
[20131110.094525] If you did not make these changes intentionally, you can correct them by running:
[20131110.094525]
[20131110.094525] > /usr/local/cpanel/scripts/check_cpanel_rpms --fix
[20131110.094525] The following RPMs are missing from your system:
[20131110.094525] MySQL55-client-5.5.32-1.cp1136
[20131110.094525] MySQL55-devel-5.5.32-1.cp1136
[20131110.094525] MySQL55-server-5.5.32-1.cp1136
[20131110.094525] MySQL55-shared-5.5.32-1.cp1136
[20131110.094525] MySQL55-test-5.5.32-1.cp1136
[20131110.094526]
[20131110.094526] The following RPMs are unneeded on your system and should be uninstalled:
[20131110.094526] MySQL51-client-5.1.70-1.cp1136
[20131110.094526] MySQL51-devel-5.1.70-1.cp1136
[20131110.094526] MySQL51-server-5.1.70-1.cp1136
[20131110.094526] MySQL51-shared-5.1.70-1.cp1136
[20131110.094526] MySQL51-test-5.1.70-1.cp1136
[20131110.094751] Removing 0 broken rpms:
[20131110.094751] rpm: no packages given for erase
[20131110.094752] Downloading http://httpupdate.cpanel.net/RPM/11.36/centos/6/x86_64/rpm.md5
[20131110.094753] Downloading http://httpupdate.cpanel.net/RPM/11.36/centos/6/x86_64/MySQL55-client-5.5.32-1.cp1136.x86_64.rpm
[20131110.094753] Downloading http://httpupdate.cpanel.net/RPM/11.36/centos/6/x86_64/MySQL55-devel-5.5.32-1.cp1136.x86_64.rpm
[20131110.094753] Downloading http://httpupdate.cpanel.net/RPM/11.36/centos/6/x86_64/MySQL55-server-5.5.32-1.cp1136.x86_64.rpm
[20131110.094754] Downloading http://httpupdate.cpanel.net/RPM/11.36/centos/6/x86_64/MySQL55-shared-5.5.32-1.cp1136.x86_64.rpm
[20131110.094754] Downloading http://httpupdate.cpanel.net/RPM/11.36/centos/6/x86_64/MySQL55-test-5.5.32-1.cp1136.x86_64.rpm
[20131110.094755] Hooks system enabled
[20131110.094755] Checking for and running RPM::Versions 'pre' hooks for any RPMs about to be installed
warn [check_cpanel_rpms] program "/scripts/premysqlup" is not executable
[20131110.094755] All required 'pre' hooks have been run
[20131110.094756] Uninstalling unneeded rpms: MySQL51-devel MySQL51-test MySQL51-client MySQL51-shared MySQL51-server
[20131110.094813] Shutting down MySQL... SUCCESS!
[20131110.094817] Installing new rpms: MySQL55-client-5.5.32-1.cp1136.x86_64.rpm MySQL55-devel-5.5.32-1.cp1136.x86_64.rpm MySQL55-server-5.5.32-1.cp1136.x86_64.rpm MySQL55-shared-5.5.32-1.cp1136.x86_64.rpm MySQL55-test-5.5.32-1.cp1136.x86_64.rpm
[20131110.094817] Preparing packages for installation...
[20131110.094818] MySQL55-client-5.5.32-1.cp1136
[20131110.094822] MySQL55-server-5.5.32-1.cp1136
[20131110.094827] ERROR: 1136 Column count doesn't match value count at row 1
[20131110.094827] 131110 9:48:27 [ERROR] Aborting
[20131110.094827]
[20131110.094827] 131110 9:48:27 [Note] /usr/sbin/mysqld: Shutdown complete
[20131110.094827]
[20131110.094827]
[20131110.094827] Installation of system tables failed! Examine the logs in
[20131110.094827] /var/lib/mysql for more information.
[20131110.094827]
[20131110.094827] You can try to start the mysqld daemon with:
[20131110.094827]
[20131110.094827] shell> /usr/sbin/mysqld --skip-grant &
[20131110.094827]
[20131110.094827] and use the command line tool /usr/bin/mysql
[20131110.094827] to connect to the mysql database and look at the grant tables:
[20131110.094827]
[20131110.094827] shell> /usr/bin/mysql -u root mysql
[20131110.094827] mysql> show tables
[20131110.094827]
[20131110.094827] Try 'mysqld --help' if you have problems with paths. Using --log
[20131110.094827] gives you a log in /var/lib/mysql that may be helpful.
[20131110.094827]
[20131110.094827] Please consult the MySQL manual section
[20131110.094827] 'Problems running mysql_install_db', and the manual section that
[20131110.094827] describes problems on your OS. Another information source are the
[20131110.094827] MySQL email archives available at http://lists.mysql.com/.
[20131110.094827]
[20131110.094827] Please check all of the above before mailing us! And remember, if
[20131110.094827] you do mail us, you MUST use the /usr/bin/mysqlbug script!
[20131110.094827]
[20131110.094833] Looking for 'mysql' as: /usr/bin/mysql
[20131110.094833] Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
[20131110.094833] Running 'mysqlcheck with default connection arguments
[20131110.094833] Running 'mysqlcheck with default connection arguments
[20131110.094833] cphulkd.auths OK
[20131110.094833] cphulkd.blacklist OK
[20131110.094833] cphulkd.brutes OK
[20131110.094833] cphulkd.good_logins OK
[20131110.094833] cphulkd.logins OK
[20131110.094833] cphulkd.report OK
[20131110.094833] cphulkd.whitelist OK
[20131110.094833] eximstats.defers OK
[20131110.094833] eximstats.failures OK
[20131110.094833] eximstats.sends OK
[20131110.094833] eximstats.smtp OK
[20131110.094833] horde.horde_alarms OK
[20131110.094833] horde.horde_cache OK
[20131110.094833] horde.horde_datatree OK
[20131110.094833] horde.horde_datatree_attributes OK
[20131110.094833] horde.horde_groups OK
[20131110.094833] horde.horde_groups_members OK
[20131110.094833] horde.horde_histories OK
[20131110.094833] horde.horde_locks OK
[20131110.094833] horde.horde_perms OK
[20131110.094833] horde.horde_prefs OK
[20131110.094833] horde.horde_sessionhandler OK
[20131110.094833] horde.horde_signups OK
[20131110.094833] horde.horde_syncml_anchors OK
[20131110.094833] horde.horde_syncml_map OK
[20131110.094833] horde.horde_tokens OK
[20131110.094833] horde.horde_users OK
[20131110.094833] horde.horde_vfs OK
[20131110.094833] horde.imp_sentmail OK
[20131110.094833] horde.ingo_forwards OK
[20131110.094833] horde.ingo_lists OK
[20131110.094833] horde.ingo_rules OK
[20131110.094833] horde.ingo_shares OK
[20131110.094833] horde.ingo_shares_groups OK
[20131110.094833] horde.ingo_shares_users OK
[20131110.094833] horde.ingo_spam OK
[20131110.094833] horde.ingo_vacations OK
[20131110.094833] horde.kronolith_events OK
[20131110.094833] horde.kronolith_shares OK
[20131110.094833] horde.kronolith_shares_groups OK
[20131110.094833] horde.kronolith_shares_users OK
[20131110.094833] horde.kronolith_storage OK
[20131110.094833] horde.mnemo_memos OK
[20131110.094833] horde.mnemo_shares OK
[20131110.094833] horde.mnemo_shares_groups OK
[20131110.094833] horde.mnemo_shares_users OK
[20131110.094833] horde.nag_shares OK
[20131110.094833] horde.nag_shares_groups OK
[20131110.094833] horde.nag_shares_users OK
[20131110.094833] horde.nag_tasks OK
[20131110.094833] horde.turba_objects OK
[20131110.094833] horde.turba_shares OK
[20131110.094833] horde.turba_shares_groups OK
[20131110.094833] horde.turba_shares_users OK
[20131110.094833] leechprotect.hits OK
[20131110.094833] logaholicDB_vps_1111842_12395._logaholic_GlobalSettings OK
[20131110.094833] logaholicDB_vps_1111842_12395._logaholic_Profile_URL_Params OK
[20131110.094833] logaholicDB_vps_1111842_12395._logaholic_Profiles OK
[20131110.094833] logaholicDB_vps_1111842_12395._logaholic_Traffic_Sources OK
[20131110.094833] logaholicDB_vps_1111842_12395._logaholic_users OK
[20131110.094833] logaholicDB_vps_1111842_12395._user_Agents OK
[20131110.094833] logaholicDB_vps_1111842_12395.lgstatus OK
[20131110.094833] logaholicDB_vps_1111842_12395.notes OK
[20131110.094833] mysql.columns_priv OK
[20131110.094833] mysql.db OK
[20131110.094833] mysql.event OK
[20131110.094833] mysql.func OK
[20131110.094833] mysql.general_log OK
[20131110.094833] mysql.help_category OK
[20131110.094833] mysql.help_keyword OK
[20131110.094833] mysql.help_relation OK
[20131110.094833] mysql.help_topic OK
[20131110.094833] mysql.host OK
[20131110.094833] mysql.ndb_binlog_index OK
[20131110.094833] mysql.plugin OK
[20131110.094833] mysql.proc OK
[20131110.094833] mysql.procs_priv OK
[20131110.094833] mysql.proxies_priv OK
[20131110.094833] mysql.servers OK
[20131110.094833] mysql.slow_log OK
[20131110.094833] mysql.tables_priv OK
[20131110.094833] mysql.time_zone OK
[20131110.094833] mysql.time_zone_leap_second OK
[20131110.094833] mysql.time_zone_name OK
[20131110.094833] mysql.time_zone_transition OK
[20131110.094833] mysql.time_zone_transition_type OK
[20131110.094833] mysql.user OK
[20131110.094833] roundcube.cache OK
[20131110.094833] roundcube.cache_index OK
[20131110.094833] roundcube.cache_messages OK
[20131110.094833] roundcube.cache_thread OK
[20131110.094833] roundcube.contactgroupmembers OK
[20131110.094833] roundcube.contactgroups OK
[20131110.094833] roundcube.contacts OK
[20131110.094833] roundcube.cp_schema_version OK
[20131110.094833] roundcube.dictionary OK
[20131110.094833] roundcube.identities OK
[20131110.094833] roundcube.searches OK
[20131110.094833] roundcube.session OK
[20131110.094833] roundcube.system OK
[20131110.094833] roundcube.users OK
[20131110.094833] Running 'mysql_fix_privilege_tables'...
[20131110.094833] OK
[20131110.094834] Starting MySQL SUCCESS!
[20131110.094834] MySQL55-test-5.5.32-1.cp1136
[20131110.094847] MySQL55-shared-5.5.32-1.cp1136
[20131110.094847] MySQL55-devel-5.5.32-1.cp1136
[20131110.094847] Prelinking is disabled.
[20131110.094847] Checking for and running RPM::Versions 'post' hooks for any RPMs just installed
warn [check_cpanel_rpms] program "/scripts/postmysqlinstall" is not executable
warn [check_cpanel_rpms] program "/scripts/postmysqlup" is not executable
[20131110.094847] All required 'post' hooks have been run

حالا دوباره دستور “mysql” را اجرا کنید تا تغییرات را ببینید.

root# mysql

نتیجه گیری :

به مانیتور MySQL خوش آمدید. دستورات با ; یا g پایان می‌یابند.

شناسه اتصال MySQL شما 12 است

نسخه سرور: 5.5.32-cll MySQL Community Server (GPL)

کپی‌رایت (c) 2000، 2013، Oracle و/یا وابستگان آن. تمامی حقوق محفوظ است.

Oracle یک علامت تجاری ثبت شده Oracle Corporation و/یا وابستگان آن است. سایر نام‌ها ممکن است علائم تجاری صاحبان مربوطه باشند.

برای راهنمایی ‘help;’ یا ‘h’ را تایپ کنید. برای پاک کردن دستور ورودی فعلی ‘c’ را تایپ کنید.

این کار MySQL را در cPanel به نسخه ذکر شده ارتقا خواهد داد

چقدر این مطلب مفید بود؟

روی یک ستاره کلیک کنید تا به آن امتیاز دهید!

میانگین امتیاز 0 / 5. تعداد آرا: 0

تا الان رای نیامده! اولین نفری باشید که به این پست امتیاز می دهید.