i use
my steps
1. create a new database ckdb on mysql, then  create table t1(a int, primary key(a)); and insert some rows
2. SET allow_experimental_database_materialize_mysql=1; at clickhouse, 
3. CREATE DATABASE ckdb ENGINE = MaterializeMySQL('127.0.0.1:3306', 'ckdb', 'root', 'A123b_456');
4. use ckdb and select * from t1 ok
5. create table dzm as select * from others in mysql ----> cannot see dzm in clickhouse, but if select * from t1, reports
```
Code: 48. DB::Exception: Received from localhost:9000. DB::Exception: The ckdb.dzm cannot be materialized, because there is no primary keys..
```
6. create table t2(a int,b int primary a);----> cannot see t2 in clickhouse, , but if select * from t1, reports
```
Code: 44. DB::Exception: Received from localhost:9000. DB::Exception: Sorting key cannot contain nullable columns.
```
<del>7. if i drop ckdb and recreate it, all tables can be selected </del>
7.if there are some 'bad' tables in a database, all tables in that database cannot be selected

Make sure to check documentation https://clickhouse.yandex/docs/en/ first. If the question is concise and probably has a short answer, asking it in Telegram chat https://telegram.me/clickhouse_en is probably the fastest way to find the answer. For more complicated questions, consider asking them on StackOverflow with "clickhouse" tag https://stackoverflow.com/questions/tagged/clickhouse 

If you still prefer GitHub issues, remove all this text and ask your question here.

const TQuery & create_query, const Context & context, const String & mapped_to_database, const String & mysql_database)
{
    auto rewritten_query = std::make_shared<ASTCreateQuery>();
    if (resolveDatabase(create_query.database, mysql_database, mapped_to_database, context) != mapped_to_database)
        return {};
    const auto & create_defines = create_query.columns_list->as<MySQLParser::ASTCreateDefines>();
    NamesAndTypesList columns_name_and_type = getColumnsList(create_defines->columns);
    const auto & [primary_keys, unique_keys, keys, increment_columns] = getKeys(create_defines->columns, create_defines->indices, context, columns_name_and_type);
    if (primary_keys.empty())
        throw Exception("The " + backQuoteIfNeed(mysql_database) + "." + backQuoteIfNeed(create_query.table)
            + " cannot be materialized, because there is no primary keys.", ErrorCodes::NOT_IMPLEMENTED);
    auto columns = std::make_shared<ASTColumns>();
    const auto & create_materialized_column_declaration = [&](const String & name, const String & type, const auto & default_value)
    {
        auto column_declaration = std::make_shared<ASTColumnDeclaration>();
        column_declaration->name = name;
        column_declaration->type = makeASTFunction(type);
        column_declaration->default_specifier = "MATERIALIZED";
        column_declaration->default_expression = std::make_shared<ASTLiteral>(default_value);
        column_declaration->children.emplace_back(column_declaration->type);
        column_declaration->children.emplace_back(column_declaration->default_expression);
        return column_declaration;
    };
    
    String sign_column_name = getUniqueColumnName(columns_name_and_type, "_sign");
    String version_column_name = getUniqueColumnName(columns_name_and_type, "_version");
    columns->set(columns->columns, InterpreterCreateQuery::formatColumns(columns_name_and_type));
    columns->columns->children.emplace_back(create_materialized_column_declaration(sign_column_name, "Int8", UInt64(1)));
    columns->columns->children.emplace_back(create_materialized_column_declaration(version_column_name, "UInt64", UInt64(1)));