开发者

I want to switch on lower_case_table_names in mysql, but PLESK 10 stops working [closed]

开发者 https://www.devze.com 2023-03-09 05:50 出处:网络
Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed. This question is off-topic. It is not currently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 9 years ago.

Improve this question

I want to share my solution about the above problem, so you can save some time. The solution is simple. You just have to rename all tables used by PLESK 10 (databases psa). Use your prefered mysql client and connect to the databases, then execute the following sql script:

<!-- language: sql -->
    USE psa ;
    RENAME TABLE APSApplicationItems to apsapplicationitems ;
    RENAME TABLE APSCatalogUpdates to apscatalogupdates ;
    RENAME TABLE APSClientApplicationItems to apsclientapplicationitems ;
    RENAME TABLE APSLicenseTypes to apslicensetypes ;
    RENAME TABLE APSLicenses to apslicenses ;
    RENAME TABLE ApiRpcCallsStat to apirpccallsstat ;
    RENAME TABLE BackendCache to backendcache ;
    RENAME TABLE BackupsRunning to backupsrunning ;
    RENAME TABLE BackupsScheduled to backupsscheduled ;
    RENAME TABLE BackupsSettings to backupssettings ;
    RENAME TABLE Cards to cards ;
    RENAME TABLE ClientsTraffic to clientstraffic ;
    RENAME TABLE Components to components ;
    RENAME TABLE Configurations to configurations ;
    RENAME TABLE DashboardPreset to dashboardpreset ;
    RENAME TABLE DashboardPresetConfig to dashboardpresetconfig ;
    RENAME TABLE DatabaseServers to databaseservers ;
    RENAME TABLE DomainServices to domainservices ;
    RENAME TABLE DomainsTraffic to domainstraffic ;
    RENAME TABLE GL_remote_domains to gl_remote_domains ;
    RENAME TABLE GL_settings to gl_settings ;
    RENAME TABLE IP_Addresses to ip_addresses ;
    RENAME TABLE IpAddressesCollections to ipaddressescollections ;
    RENAME TABLE IpCollections to ipcollections ;
    RENAME TABLE Limits to limits ;
    RENAME TABLE Logos to logos ;
    RENAME TABLE MailLists to maillists ;
    RENAME TABLE MailMessagesStat to mailmessagesstat ;
    RENAME TABLE Modules to modules ;
    RENAME TABLE Notes to notes ;
    RENAME TABLE Notifications to notifications ;
    RENAME TABLE PMM to pmm ;
    RENAME TABLE PMMDefault to pmmdefault ;
    RENAME TABLE Parameters to parameters ;
    RENAME TABLE Permissions to permissions ;
    RENAME TABLE PersistentCache to persistentcache ;
    RENAME TABLE PlanItemProperties to planitemproperties ;
    RENAME TABLE PlanItems to planitems ;
    RENAME TABLE PlansSubscriptions to planssubscriptions ;
    RENAME TABLE PleskPagesStat to pleskpagesstat ;
    RENAME TABLE Repository to repository ;
    RENAME TABLE SBConfig to sbconfig ;
    RENAME TABLE SBResellers to sbresellers ;
    RENAME TABLE SBSites to sbsites ;
    RENAME TABLE SSOBranding to ssobranding ;
    RENAME TABLE SiteAppFiles to siteappfiles ;
    RENAME TABLE SiteAppPackages to siteapppackages ;
    RENAME TABLE SiteAppResources to siteappresources ;
    RENAME TABLE SiteApps to siteapps ;
    RENAME TABLE SiteAppsHitsStat to siteappshitsstat ;
    RENAME TABLE SitePagesStat to sitepagesstat ;
    RENAME TABLE Skins to skins ;
    RENAME TABLE SubscriptionProperties to subscriptionproperties ;
    RENAME TABLE Subscriptions to subscriptions ;
    RENAME TABLE Templates to templates ;
    RENAME TABLE TmplData to tmpldata ;
    RENAME TABLE WebApps to webapps ;
    RENAME TABLE Webmails to webmails ;
    RENAME TABLE externalWebmails to externalwebmails ;
    RENAME TABLE smb_apsBundleFilterItems to smb_apsbundlefilteritems ;
    RENAME TABLE smb_apsBundleFilters to smb_apsbundlefilters ;
    RENAME TABLE smb_apsCategories to smb_apscategories ;
    RENAME TABLE smb_apsContexts to smb_apscontexts ;
    RENAME TABLE smb_apsImportedResources to smb_apsimportedresources ;
    RENAME TABLE smb_apsImportedSettings to smb_apsimportedsettings ;
    RENAME TABLE smb_apsInstanceErrors to smb_apsinstanceerrors ;
    RENAME TABLE smb_apsInstances to smb_apsinstances ;
    RENAME TABLE smb_apsMetas to smb_apsmetas ;
    RENAME TABLE smb_apsPackageUpdates to smb_apspackageupdates ;
    RENAME TABLE smb_apsPackages to smb_apspackages ;
    RENAME TABLE smb_apsPackagesCategories to smb_apspackagescategories ;
    RENAME TABLE smb_apsProvisionEnvironments to smb_apsprovisionenvironments ;
    RENAME TABLE smb_apsProvisions to smb_apsprovisions ;
    RENAME TABLE smb_apsResourceParameters to smb_apsresourceparameters开发者_运维知识库 ;
    RENAME TABLE smb_apsResources to smb_apsresources ;
    RENAME TABLE smb_apsSettings to smb_apssettings ;
    RENAME TABLE smb_componentUpdates to smb_componentupdates ;
    RENAME TABLE smb_emailAliases to smb_emailaliases ;
    RENAME TABLE smb_fileSharingUnlistedFiles to smb_filesharingunlistedfiles ;
    RENAME TABLE smb_generalPermissions to smb_generalpermissions ;
    RENAME TABLE smb_productUpgrades to smb_productupgrades ;
    RENAME TABLE smb_roleGeneralPermissions to smb_rolegeneralpermissions ;
    RENAME TABLE smb_roleServicePermissions to smb_roleservicepermissions ;
    RENAME TABLE smb_serviceEntryPoints to smb_serviceentrypoints ;
    RENAME TABLE smb_serviceInstances to smb_serviceinstances ;
    RENAME TABLE smb_servicePermissionAccounts to smb_servicepermissionaccounts ;
    RENAME TABLE smb_servicePermissions to smb_servicepermissions ;
    RENAME TABLE smb_serviceProviders to smb_serviceproviders ;
    RENAME TABLE smb_userServicePermissions to smb_userservicepermissions ;

Then locate your my.cnf file (usually in - unix: /etc/mysql/my.cnf; windows: /conf/my.cnf) and change (or add if doesn't exists) the following line:

lower_case_table_names = 1


Scripted :

  1. Generate rename_psa.sql :

    for table in echo "show tables" | mysql -N psa | grep [A-Z]; do echo "RENAME TABLE $table TO $(echo $table | tr A-Z a-z);" ; done > rename_psa.sql

  2. Backup table & Run script

    mysqldump --opt psa > psa.sql

    mysql psa < rename_psa.sql

  3. Edit /etc/my.cnf & done

0

精彩评论

暂无评论...
验证码 换一张
取 消