I have a database and I'm trying to make only my user have access to that database. or no one else can open, search, delete anything. I'm using the following syntax:
GRANT USAGE ON batabase.* TO 'fabricio'@'%'; FLUSH PRIVILEGES;
But nothi...
Let's suppose that in a MYSQL database query, I need to pick up the last 1000 data that was posted, but within those results, the order must be growing (not descending, as would happen in ORDER BY ID DESC Limit 1000 ).
The response of...
I have a massive database, it has more than 2,000 rows, and the second column has an ENUM that allows only 'Option 1' and 'Option 2'. If I enter 200 rows in the table and write the wrong ENUM name as an example insert into tabela values ('bla...
When attempting to import a database from a dump with 1.2GB, the following error occurred:
ERROR 1153 (08S01) at line 727: Got a packet bigger than 'max_allowed_packet' bytes
The command I'm using for import is:
mysql -u usuario -p...
I'm having a problem changing user permissions in mysql with the root user, in Debian.
I can usually access the terminal:
$ mysql -u root -p
So he asks me the root password, I put the password and normal access. However, when I try to ex...
I have a database that I need to change all the columns that are in FLOAT and DOUBLE to DECIMAL, are about 150 tables and I spend a lot of time looking one by one, is there any command that shows me this?
MY SQL database, use 6.3 workbench...
Considering that I have 2 tables in the DB, "news" and "news", each with its own fields:
IsitpossibletomakeaSELECTinthetwotablesatthesametimesothatIgetthetop4valuesofthefields"impressions" (NEWS table) and "clicks" (NEWS table), the two comb...
I am learning about database when a doubt arose.
For example, I have two tables:
user (_iduser, nome, sexo, ect.._)
login (_idlogin, login, senha_))
You have 1:1 relationship. My question is precisely whether...
I have the following sql:
SELECT DISTINCT cp_pessoa.id, cp_pessoa.nome
FROM cp_pessoa
LEFT JOIN cp_habilidade_freelancer ON (cp_habilidade_freelancer.id_freelancer = cp_pessoa.id)
LEFT JOIN cp_habilidade ON (cp_habilidade.id = cp_habilidade...
I have to make the following adaptation in a query:
Table app_usuários : id, nome, sobrenome, hash, sexo, interesse, latitude e longitude .
Table app_likes : id, user_a_id, user_b_id
Briefly, I have a query that...