Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Mysql Database Name Can Contain Only Latin Characters, Numbers, And Underscores Rate Topic   - - - - -

 

Posted 10 August 2018 - 10:43 AM #1

Is there anyway round this?  I'm creating a small website on shared hosting that creates the DB name for you so I can't change it. CS Cart won't allow dashes.

"MySQL database name can contain only Latin characters, numbers, and underscores"



 
  • soft-solid
  • Junior Member
  • Members
  • Join Date: 19-Apr 10
  • 405 posts

Posted 10 August 2018 - 10:54 AM #2

Hello.

You can't use char "-" in database name.

https://stackoverflo...me-restrictions

 

Best regards

Robert.


Team of SoftSolid
cs-cart.pl

 

Posted 10 August 2018 - 11:03 AM #3

Wanna bet? 

Solution ;)

In /install/app/Installer/Validator.php on 222 line change:

if (preg_match('/^[0-9a-zA-Z$_]{1,63}$/', $name)) {

to
if (preg_match('/^[0-9a-zA-Z$_-]{1,63}$/', $name)) {



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 17833 posts

Posted 10 August 2018 - 01:17 PM #4

Wanna bet? 

Solution ;)

In /install/app/Installer/Validator.php on 222 line change:

if (preg_match('/^[0-9a-zA-Z$_]{1,63}$/', $name)) {

to
if (preg_match('/^[0-9a-zA-Z$_-]{1,63}$/', $name)) {

 

It does not depend on CS-Cart, please check MySQL requirements

 

https://dev.mysql.co...dentifiers.html


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.