Fix required for My...
 
Notifications
Clear all

Fix required for MySQL Databases with "-" in their names

8 Posts
3 Users
0 Reactions
1,442 Views
Posts: 60
 Jade
Topic starter
(@shabsta)
Member
Joined: 7 years ago

We've run into scenarios where mysql databases with a "-" in the name cause solidcp to fail when attempting to access the database and perform functions such as manage the database, view size, backup, delete etc.

Could you guys please investigate this issue and provide a fix within the next version of Solid?

Page URL:
https://XXXXXX/Default.aspx?pid=SpaceMySql5&mid=XXXXXX&ctl=edit_item&ItemID=XXXXXX&SpaceID=XXXXXX

Logged User:
serveradmin

Work on Behalf:
XXXXXX@XXXXXX.co.za

Hosting Space:
XXXXXX

Stack Trace:
System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-db' at line 1 
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) 
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) 
at SolidCP.Providers.Database.DatabaseServer.GetDatabase(String databaseName) 
at SolidCP.EnterpriseServer.DatabaseServerController.GetSqlDatabase(Int32 itemId) 
at SolidCP.EnterpriseServer.esDatabaseServers.GetSqlDatabase(Int32 itemId) 
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) 
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) 
at SolidCP.EnterpriseServer.esDatabaseServers.GetSqlDatabase(Int32 itemId) 
at SolidCP.Portal.SqlEditDatabase.BindItem()

7 Replies
Posts: 1964
Admin
(@m-tiggelaar)
Noble Member
Joined: 8 years ago

Hello,

Are you sure this isn't an issue with mysql it self where per default valid charracters are: ASCII: [0-9,a-z,A-Z$_] (basic Latin letters, digits 0-9, dollar, underscore).

https://dev.mysql.com/doc/refman/8.0/en/identifiers.html

In general the default solidcp policy also does not allow - .

did you exclusively permit the - char in the SolidCP mysql policy? (else the bug in question would be why it's allowed to enter that symbol as it shouldn't be).

Regards,

Marco

Reply
Posts: 60
 Jade
Topic starter
(@shabsta)
Member
Joined: 7 years ago

Hey Marco,

Confirmed that its not a mysql issue as these databases were originally created by Helm 3.

The database exists on mysql and can be accessed / managed by other gui's (webmysql, phpmyadmin)

Reply
Posts: 1964
Admin
(@m-tiggelaar)
Noble Member
Joined: 8 years ago

Well following the mysql 8 doc linked earlier such charracters are only allowed in "quote identifiers"

I don't see a way how SolidCP can code that in an easy way unless you manually enter it that way.

Reply
Posts: 60
 Jade
Topic starter
(@shabsta)
Member
Joined: 7 years ago

I didnt say I was using mysql 8 🙂

If helm 3 / helm 4 can manage databases with a hyphen in the name, and both these windows control panels are old then Im sure solidcp can too, if the code is updated / fixed to support it.

Its not a limitation on MySQL (excl version 8 as you identified) but a bug with SolidCP

Reply
Page 1 / 2
Share: