use of capitals in databasenames in phpMyAdmin
Posted by: boulebal (---.adsl2.static.versatel.nl)
Date: January 13, 2015 12:45PM

I have the following problem :

With a friend we are devellopping a website . Each of us is doing that locally.
My friend is using UBUNTU with PhPMyAdmin.
I am using Wamp with PhPMyadmin.
When I receive a xxxxxx.sql database then I can see tablenames starting with capitals.
When I import this sql database the capitals are changed to lowercase.

Can anybody tell me how to keep the Capitals. Does it have to do with the chosen charactersets ?

If I use capitals in a create and I call the datatbase name , say 'ABC' after accepting the database the name changes to 'abc'


Please advice,

Tom

Options: ReplyQuote
Re: use of capitals in databasenames in phpMyAdmin
Posted by: RiggsFolly (---.as43234.net)
Date: January 13, 2015 01:30PM

Hi Tom,

OK, point1, MySQL is the database management software, phpMyAdmin is a tool that allows you to manipulate a MySQL database easily, rather than having to use the command line and is of course written in PHP.


This is a MySQL thing and is related to the case sensitivity of various different operating system.
. Windows : Not case sentivive
. Unix/Linus : Case sensitive
. MAC : Well a bit of bother really???

Strangley it is best described in the MySQL Manual

Basically you both need to set lower_case_table_names to the same value and I would suggest 1 is your best bet for compatibility.

On Unix, the default value of lower_case_table_names is 0. On Windows the default value is 1. On OS X, the default value is 2.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: use of capitals in databasenames in phpMyAdmin
Posted by: Otomatic (Moderator)
Date: January 13, 2015 03:04PM

Hi,

Rules relating to the names of "objects" MySQL databases, tables, columns, etc.
- Length of 64 characters.
- Some characters (particularly space) are either banned or discouraged; to avoid any problems, do not use diacritical characters, use letters a-z, digits, and the underscore (_); do not start with a digit and adopt a coherent and common policy breaks all your objects. (In my humble opinion, the simplest is the "all lower case", but you can adopt the type "Own Name", that is to say the first letter capitalized).
- They must not be identical of terms of the SQL language as Create, Use, Select, Join, etc.

--- Uppercase, lowercase ---
The rules on the case (that is to say, the choice between upper and lower case) change with the operating system:
- The keywords of SQL and column names are case-insensitive, that is to say, they can be written in uppercase or lowercase.
- The names of tables and databases are:
- Sensitive if MySQL is installed on Linux
- Insensitive if MySQL is installed on Windows
This difference is due to the fact that MySQL records databases and tables as files; Windows is case insensitive file names, while Linux is sensitive.

As can change provider and thus change the operating system, it is best to always consider the names of MySQL as sensible objects, so that queries run regardless of the operating system.

By using the same rules for variable names and PHP files, one is freed of error.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: use of capitals in databasenames in phpMyAdmin
Posted by: boulebal (---.adsl2.static.versatel.nl)
Date: January 13, 2015 04:13PM

Otomatic,


Where can I set the "Own Name" if I work with PhpMyAdmin in my case. to avoid changing tablenames, .

thanks Tom

Options: ReplyQuote
Re: use of capitals in databasenames in phpMyAdmin
Posted by: Otomatic (Moderator)
Date: January 13, 2015 06:09PM

Hi,

See MySQL Identifier Case Sensitivity

Pay attention to lower_case_table_names directive in my.ini file. On Windows the default value is 1 and this means: Table names are stored in lowercase on disk and name comparisons are not case sensitive. MySQL converts all table names to lowercase on storage and lookup. This behavior also applies to database names and table aliases.

This is not a problem of Wampserver or PhpMyAdmin, it's a problem of Windows for what file names are not case sensitive.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote


Sorry, only registered users may post in this forum.