mysql - 创建成功后表不存在
问题描述
我通过命令行使用 MySQL 来创建一个名为javafxsample
. 代码如下:
create database javafxsample;
use javafxsample;
create table if not exists user(
id int(11) not null auto_increment,
username varchar(255) not null unique,
last_name varchar(255) not null,
first_name varchar(255) not null,
password varchar(255) not null,
created_at datetime not null default current_timestamp,
primary key(id)
);
javafxsample
在 MySQL 命令行中成功创建数据库。(我知道这一点是因为我可以使用SHOW DATABASES;
.DESCRIBE javafxsample;
错误 1146 (42S02):表 'javafxsample.javafxsample' 不存在。
我不知道如何解决这个问题,也不知道为什么我看不到表javafxsample
。我正在使用 MySQL 服务器版本 5.7.24。任何帮助或建议,以得到这个表工作真的很感激。
解决方案
javafxsample
是你的数据库。您不能在数据库上使用描述。
试试describe user
吧
推荐阅读
- c++ - 在 Windows 内核中阻止 RPC 调用
- react-native - 为什么我的 Bottom.Tab 中的标题没有垂直居中?
- python - 使用 Telegram-bot-python 添加回调监听器
- docker - 如何从在 dockerfile 中设置了 USER 的容器运行命令,而不会出现 encoutering 和权限错误
- javascript - 在 Google 地图中将圆圈叠加到纬度/经度和半径
- python-3.x - Python 3.9 中的进程在 ThreadPoolExecutor 中创建时以代码 1 退出
- python - 如何将数据库值设置为 for 循环中的元素?
- plot - Octave 中的 Kmeans 聚类——在一个轴上绘制多个变量与标准化值的问题,以及在旧数据上覆盖新数据的问题
- python - 根据原始列表之一中的重复项,将列表列表拆分为两个列表列表
- wordpress - 购买产品后重定向到自定义联系表