Why not add up the number of unique records in mysql?

In phpmyadmin I see the following pattern in the indexes on the table (screen)

The unique elements can not be equal to the number.
The field code varchar(50) utf8_unicode_ci is a
location_id int(10)

What could be wrong?
June 14th 19 at 19:15
2 answers
June 14th 19 at 19:17
Is the output result of the query SHOW INDEXES FROM table to InnoDB and it shows a hell of a thing (Google will give a bunch of bugs for different versions of MySQL). Like the problem was solved in MySQL 5.7

phpmyadmin in this case just prints what he gives MySQL.
And it is true that in MySQL 5.7, everything is displayed correctly!
59d9f5d6d8f48693051312.jpeg - Paris.Wolff commented on June 14th 19 at 19:20
June 14th 19 at 19:19
Judging by Your picture, but in the same issue, I suspect that it may be PHPMyAdmin'e, or those who localize (translated into Russian).

My advice - throw out PHPMyAdmin, it is good to keep ladies small databases or load them back in terms of hosting. For MySQL there are lots of different programs:
1. HeidiSQL
2. MySQL Workbench
3. Navicat

take any of them and forget about such problems

PS I Suspect that in that column (with the heading "number of unique items"), you specify not really the number of unique elements and approximate number of records in a table might result generates some of these commands: this or this. If You want exactly to answer this question (what is the figure and where she is) - you need to enable logging in MySQL all queries and see which queries are performed during the opening of this particular page... to find the right, etc. But I wouldn't waste time on such nonsense.
But if remote access to the database is closed, which of these tools to take that advise ? - Paris.Wolff commented on June 14th 19 at 19:22
if the remote access to the database is closed, the tools are all the same, the approach is different. Some options:
a) Very cheap hosting (0.5-1$) for which "no", as a result, the project is also quite small -- paged database to yourself, do all the necessary manipulations, downloadable database back, or - simply change the hosting to a more adequate, that would not do something like "first themselves create problems and then own them and decide".
b) the Hosting a little more expensive (or not "expensive", but just "better"), which has SSH and/or the ability to access the database remotely or parasivam SSH tunnel to the database and work with it or open the access DB remotely (including safety measures, of course)

P. S. For anyone a little bit "normal" project, the problem of the level of "I don't have remote access to the database" does not occur a priori. This is a problem-level projects, "a Blog about my dog on Wordpress", or the problem is not of the proper construction of the mechanisms of application/project (the"first paid hosting, and later learned that there is no remote database access and/or SSH"). Even on a VPS for 1.5-2$/month (which is more than comparable to the price of most cheap webhosts) such problems cannot arise by definition. - flavie.OConne commented on June 14th 19 at 19:25
Options a) and b) excellent.
And if it is a customer and hosting with phpmyadmin he chose, in that case to do ? - Salvado commented on June 14th 19 at 19:28
options in General, usually several, for example:
1. As I wrote above - the process of software development is the process of developing and hosting it does not apply. Accordingly, to develop projects of such magnitude, with a probability of about 127% - need locally. Projects "such level" are about all the projects marked as "the customer picked crappy hosting" or even the projects that are associated with the word "hosting". I don't need to explain that in almost any project that involves at least some hint of a load, "hosting" levels "selected customer" - work if you will, it is not long since the site is "ask", what would the rest do not interfere. According to this, the word "hosting" in the vast majority of cases, is associated with another word - "CMS".Or any global problems with the fact that to upload a pre-prepared database (or load it) using phpMyAdmin - I personally do not see.
2. One of the tasks of the one who communicates with the customer (depending on the scale of the development it could be from the developer himself [personally], to specially trained people) is that to convince the customer to make the right choice, including the correct choice of hosting. Or, to identify the customer requirements to the same hosting in advance.

Why am I still... Problems of scale, "the customer is rogue, and basically use the hosting for 1$/month." - typical for projects with ACC. cost, and developers that are a similar value match. No self-respecting company (or even not the company) will not engage in such nonsense, as to talk on the subject of the level "let's take hosting for$1/month, change of hosting for$2/month.", as the scale of prices is not the same. And discuss such issues (waste of time to ask questions of a similar level) - equivalent to beg for a discount of 100 rubles., in the dealership when buying a car for a couple of million If the customer will Balk at the fact that he has spent on hosting as many as 12$ (per year), and have hosting for$ 24 (where "everything works") - I will give him the hosting itself, because it is much cheaper than to ramble on about matters of this level, because the corny hours of the 1st developer is worth more than the price of the whole question. - flavie.OConne commented on June 14th 19 at 19:31
your thoughts are good. If detached from the context.
A man asked a specific question: "Why not add up the number of unique records".
You propose alternatives that, apparently, may not work in certain situations. Why do they offer?
A discussion of what should be hosting, how to communicate with customers in relation to the issue have not. - Salvado commented on June 14th 19 at 19:34
well... my thoughts about hosting, which are not relevant to the topic began with Your question (about the accesses to the database, etc.), which similarly has nothing to do with the original question.

Regarding the context - I gave the author detailed references, and if you go on them and spend 5 minutes with the aim to understand what is happening - is not quite difficult to get and straight answer to your question and food for thought in the future. - flavie.OConne commented on June 14th 19 at 19:37

Find more questions by tags MySQLDatabases