Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
My lua codes for mysql
Getting these error
as the error message says, yellowpages_posts.realUser uses collation utf8mb4_unicode_ci and users.identifier uses utf8mb_general_ci.
you have to explicitly set the collation of one to the other, e.g.
yellowpages_posts.realUser = users.identifier COLLATE utf8mb4_unicode_ci
also checkout https://dev.mysql.com/doc/refman/8.0/en/cast-functions.html
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I want to copy MySQL database while replacing some vulnerable data(e/g. email, phone, name, etc/) How can I efficiently achieve this?
The steps
dump your database
import your database
obfuscate values in your copy
remove your old dump
dump your second database
do whatever you need with the dump of the copy
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I have a UTF-8 (utf8mb4) mysql database.
For some reasons, I'd like to use utf8 encoded strings in my queries.
For instance, instead of using this query
Update mail_table set mail = 'john#foo.com'
I'd like to use:
Update mail_table set mail = SomeMySQLFunction('\x6A\x6F\x68\x6E\x40\x66\x6F\x6F\x2E\x63\x6F\x6D')
How may i do this? Cast? Convert?
Thanks.
Regards.
Use UNHEX() function.
UPDATE mail_table
SET mail = UNHEX('6A6F686E40666F6F2E636F6D')
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I have few tables in MySQL and I wanted to delete data in those MySQL tables from SQL Server. Do we have any approach to perform it?
You can perform Insert/Update/ Delete/ Select using Linked Server in the SQL Server. You just need to create MySQL LinkedServer and use Open Query.
Sample Query:
DELETE FROM OPENQUERY([MYSQL_LOCAL], 'SELECT user_id FROM d_portal.users' ) where user_id = 1;
MYSQL_LOCAL is a MySQL Linked Server.
You can follow the below Article for better guidance.
https://www.sqlshack.com/mysql-query-t-sql-tutorial-for-sql-server/
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
Is there a SQL query that returns the schema of the current database? Like with columns "table", "name", "type", etc.
The platforms in question are MySQL, PostgreSQL, SQLite, and T-SQL.
The real RDBMS should all support an INFORMATION_SCHEMA set of views and tables. I think SQLite has its own take on things, but then it's a SQL library rather than a full RDBMS.
If you stick to the ANSI standard stuff your queries should be portable enough, but obviously you won't get details of the various platform-specfic features.
For MySQL, try SHOW TABLES; and DESCRIBE table_name;
For more info, check out http://dev.mysql.com/doc/refman/5.0/en/getting-information.html
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
This is an admittedly easy question, I just dont have the background in MySQL to know this and a google search has been fruitless. I have a MySQL table with a couple of mediumtext columns. When I run a SELECT query, with MySQL Workbench, it only shows me a truncated version of the contents. How can I see the entire contents of a mediumtext column within workbench? I'm sure its just a config setting I'm missing.
SQL Query Preference -> Max. Field Value Length to Display. Default 256 bytes;
Right click on a cell with MEDIUMTEXT in the result pane and choose Open value in editor;
Query menu -> Execute (All or selection) to text;